[Luk 18:18-19 KJV] (18) And a certain ruler asked him, saying, Good Master, what shall I do to inherit eternal life? (19) And Jesus said unto him, Why callest thou me good? none is good, save one, that is, God.
Jesus doesn't just deny that he himself is "good" but he denies that anyone is good (αγαθος) except God.
Luke describes Barnabas as "a good man":
Act 11:24 for he was a good (αγαθος) man, full of the Holy Spirit and of faith. And a great many people were added to the Lord.
BDAG lists αγαθος when referring to deities as referring to their beneficence (I cite only the relevant part of BDAG here):
② pert. to meeting a high standard of worth and merit, good ⓐ as adj. α. of humans and deities (the primary focus is on usefulness to humans and society in general, so Pind.+, s. AAdkins Merit and Responsibility ’60, 189f) beneficent, of God (Dio Chrys. 80 [30], 26 οἱ θεοί; Zoroaster in Philo Bybl.: 790 Fgm. 4, 52 Jac. [Eus. PE 1, 10, 52] God is ἀγαθῶν ἀγαθώτατος. Sallust. 1 πᾶς θεὸς ἀγαθός; contrast Did., Gen. 109, 3 ὁ διάβολος οὐ φύσει κακός … ἐστίν, ἀλλὰ … ἀγαθὸς γέγονεν.—Cp. IKosPH 92, 6f which calls Nero ἀ. θεός, ἀγαθὸς δαίμων [OGI 666, 3; POxy 1021, 8, both referring to Nero; POxy 1449, 4; s. also JKroll, D. Lehren d. Hermes Trismeg. 1914, 90; Rtzst., Erlösungsmyst. 189; 191ff] and Sb 349 θεῷ ἀγαθῷ Διὶ Ἡλίῳ; Philo, Leg. All. 1, 47 al.; Celsus 4, 14) Mt 19:17b (in Cleanthes, Stoic. I 127, 3ff [Eus. PE 13, 13, 37], a description of God follows the question τἀγαθὸν ἐρωτᾷς μʼ οἷόν ἐστʼ; cp. Orig., C.Cels. 3, 70, 9; Did., Gen. 98, 28); Mk 10:18b (Unknown Sayings 33–36); Lk 18:19b; Dg 8:8 (on these passages cp. Simonid., Fgm. 4, 6f χαλεπὸν ἐσθλὸν [=ἀγαθός ln. 10] ἔμμεναι; 7 θεὸς ἂν μόνος τοῦτʼ ἔχοι γέρας); μόνος ἀ. ἐστιν ibid.; πατὴρ ἀ. 1 Cl 56:16 (Philo, Op. M. 21 ἀ. εἶναι τὸν πατέρα κ. ποιητήν); ἀ. ἐν τ. ὁρωμένοις good in the visible world 60:1.—Of Christ Mk 10:17, 18a (DomGMurray, Downside Review 103, ’85, 144–46, w. ref. to Pirke Aboth 6, 3); Lk 18:18, 19a (WWagner, ZNW 8, 1907, 143–61; FSpitta, ibid. 9, 1908, 12–20; BWarfield, PTR 12, 1914, 177–228; WCaspari, Christent. u. Wissensch. 8, ’32, 218–31.—Cp. also the saying of Pythagoras in Diog. L., Prooem. 12, who does not wish to be called σοφός because μηδένα εἶναι σοφὸν ἀλλʼ ἢ θεόν); p 4 J 7:12.—Of humans, other than Jesus Mt 12:35; Ro 5:7; D 3:8; νομοθέται B 21:4; πονηροί τε καὶ ἀ. good and bad designating a motley crowd Mt 22:10. Same contrast 5:45 (cp. Jos., Ant. 8, 314). βελτίονα ποιεῖν make better 1 Cl 19:1; βελτίω γενέσθαι become better Dg 1; kind, generous (X., Cyr. 3, 3, 4; CIG 37, 49) Mt 20:15 (in Mk 10:17f=Lk 18:18 [s. above] it is understood as kind by JWellhausen, EKlostermann, Billerb., Wagner, Spitta, Dalman [Worte 277], EHirsch [D. Werden des Mk ’41, 246]); δεσπόται benevolent 1 Pt 2:18 (cp. PLips 40 II, 19, where a slave says ὁ ἀγαθὸς δεσπότης μου). δοῦλος (Heraclitus, Ep. 9, 3 [p. 212, 4 Malherbe]) Mt 25:21, 23; Lk 19:17. ἀνήρ (Teles p. 16, 6; Diod S 20, 58, 1; Epict. 3, 24, 51 al.; PLond I, 113/1, 8 p. 201; 2 Macc 15:12; 4 Macc 4:1; Jos., Bell. 5, 413, Ant. 18, 117; JGerlach, ΑΝΗΡ ΑΓΑΘΟΣ, diss. Munich ’32) Lk 23:50; Ac 11:24; νέαι Tit 2:5. ἀπόστολοι superb 1 Cl 5:3...
Arndt, W., Danker, F. W., & Bauer, W. (2000). A Greek-English lexicon of the New Testament and other early Christian literature (3rd ed., pp. 3–4). Chicago: University of Chicago Press.
So what's going on here?
The rich young ruler had addressed him as "good teacher" (διδασκαλε αγαθε) which I would think was not an unusually lofty way to address a rabbi, though I don't really know. Was it?
I've heard the idea that Jesus was hinting that he himself was God. I find that notion 180 degrees out from what is actually going on.
So what is going on?