מדע
הלכות יסודי התורה
פרק ז

Halacha

הלכה א
מִיסוֹדֵי הַדָּת לֵידַע שֶׁהָאֵל מְנַבֵּא אֶת בְּנֵי הָאָדָם. וְאֵין הַנְּבוּאָה חָלָה אֶלָּא עַל חָכָם גָּדוֹל בַּחָכְמָה, גִּבּוֹר בְּמִדּוֹתָיו, וְלֹא יְהֵא יִצְרוֹ מִתְגַּבֵּר עָלָיו בְּדָבָר בָּעוֹלָם אֶלָּא הוּא מִתְגַּבֵּר בְּדַעְתּוֹ עַל יִצְרוֹ תָּמִיד. וְהוּא בַּעַל דֵּעָה רְחָבָה נְכוֹנָה עַד מְאֹד. אָדָם שֶׁהוּא מְמֻלָּא בְּכָל הַמִּדּוֹת הָאֵלּוּ שָׁלֵם בְּגוּפוֹ, כְּשֶׁיִּכָּנֵס לַפַּרְדֵּס וְיִמָּשֵׁךְ בְּאוֹתָן הָעִנְיָנִים הַגְּדוֹלִים הָרְחוֹקִים, וְתִהְיֶה לוֹ דֵּעָה נְכוֹנָה לְהָבִין וּלְהַשִּׂיג וְהוּא מִתְקַדֵּשׁ וְהוֹלֵךְ וּפוֹרֵשׁ מִדַּרְכֵי כְּלַל הָעָם הַהוֹלְכִים בְּמַחֲשַׁכֵּי הַזְּמַן, וְהוֹלֵךְ וּמְזָרֵז עַצְמוֹ וּמְלַמֵּד נַפְשׁוֹ שֶׁלֹּא תִּהְיֶה לוֹ מַחֲשָׁבָה כְּלָל בְּאֶחָד מִדְּבָרִים בְּטֵלִים וְלֹא מֵהַבְלֵי הַזְּמַן וְתַחְבּוּלוֹתָיו, אֶלָּא דַּעְתּוֹ פְּנוּיָה תָּמִיד לְמַעְלָה קְשׁוּרָה תַּחַת הַכִּסֵּא לְהָבִין בְּאוֹתָן הַצּוּרוֹת הַקְּדוֹשׁוֹת הַטְּהוֹרוֹת, וּמִסְתַּכֵּל בְּחָכְמָתוֹ שֶׁל הַקָּדוֹשׁ בָּרוּךְ הוּא כֻּלָּהּ מִצּוּרָה רִאשׁוֹנָה עַד טַבּוּר הָאָרֶץ וְיוֹדֵעַ מֵהֶן גָּדְלוֹ, מִיָּד רוּחַ הַקֹּדֶשׁ שׁוֹרָה עָלָיו. וּבְעֵת שֶׁתָּנוּחַ עָלָיו הָרוּחַ תִּתְעָרֵב נַפְשׁוֹ בְּמַעֲלַת הַמַּלְאָכִים הַנִּקְרָאִים אִישִׁים וְיֵהָפֵךְ לְאִישׁ אַחֵר וְיָבִין בְּדַעְתּוֹ שֶׁאֵינוֹ כְּמוֹת שֶׁהָיָה אֶלָּא שֶׁנִּתְעַלָּה עַל מַעֲלַת שְׁאָר בְּנֵי אָדָם הַחֲכָמִים, כְּמוֹ שֶׁנֶּאֱמַר בְּשָׁאוּל (שמואל א י ו) "וְהִתְנַבִּיתָ עִמָּם וְנֶהְפַּכְתָּ לְאִישׁ אַחֵר":
כסף משנה
1.
It is [one] of the foundations of [our] faith that God conveys prophecy to man.
Prophecy is bestowed only upon a very wise sage of a strong character, who is never overcome by his natural inclinations in any regard. Instead, with his mind, he overcomes his natural inclinations at all times. He must [also] possess a very broad and accurate mental capacity.
A person who is full of all these qualities and is physically sound [is fit for prophecy]. When he enters the Pardes and is drawn into these great and sublime concepts, if he possesses an accurate mental capacity to comprehend and grasp [them], he will become holy. He will advance and separate himself from the masses who proceed in the darkness of the time. He must continue and diligently train himself not to have any thoughts whatsoever about fruitless things or the vanities and intrigues of the times.
Instead, his mind should constantly be directed upward, bound beneath [God's] throne [of Glory, striving] to comprehend the holy and pure forms and gazing at the wisdom of the Holy One, blessed be He, in its entirety, [in its manifold manifestations] from the most elevated [spiritual] form until the navel of the earth, appreciating His greatness from them. [After these preparations,] the divine spirit will immediately rest upon him.
When the spirit rests upon him, his soul becomes intermingled with the angels called ishim, and he will be transformed into a different person and will understand with a knowledge different from what it was previously. He will rise above the level of other wise men, as [the prophet, Samuel] told Saul [I Samuel 10:6]: "[The spirit of God will descend upon you] and you shall prophesy with them. And you will be transformed into a different person."

הלכה ב
הַנְּבִיאִים מַעֲלוֹת מַעֲלוֹת הֵן. כְּמוֹ שֶׁיֵּשׁ בַּחָכְמָה חָכָם גָּדוֹל מֵחֲבֵרוֹ כָּךְ בַּנְּבוּאָה נָבִיא גָּדוֹל מִנָּבִיא. וְכֻלָּן אֵין רוֹאִין מַרְאֵה הַנְּבוּאָה אֶלָּא בַּחֲלוֹם בְּחֶזְיוֹן לַיְלָה. אוֹ בַּיּוֹם אַחַר שֶׁתִּפּל עֲלֵיהֶן תַּרְדֵּמָה כְּמוֹ שֶׁנֶּאֱמַר (במדבר יב ו) "בַּמַּרְאָה אֵלָיו אֶתְוַדָּע בַּחֲלוֹם אֲדַבֶּר בּוֹ". וְכֻלָּן כְּשֶׁמִּתְנַבְּאִים אֵיבְרֵיהֶן מִזְדַּעְזְעִין וְכֹחַ הַגּוּף כָּשֵׁל וְעֶשְׁתּוֹנוֹתֵיהֶם מִתְטָרְפוֹת וְתִשָּׁאֵר הַדַּעַת פְּנוּיָה לְהָבִין מַה שֶּׁתִּרְאֶה. כְּמוֹ שֶׁנֶּאֱמַר בְּאַבְרָהָם (בראשית טו יב) "וְהִנֵּה אֵימָה חֲשֵׁכָה גְדלָה נֹפֶלֶת עָלָיו". וּכְמוֹ שֶׁנֶּאֱמַר בְּדָנִיֵּאל (דניאל י ח) "וְהוֹדִי נֶהְפַּךְ עָלַי לְמַשְׁחִית וְלֹא עָצַרְתִּי כֹּחַ":
כסף משנה
2.
There are a number of levels among the prophets. Just as with regard to wisdom, one sage is greater than his colleague, so, too, with regard to prophecy, one prophet is greater than another. They all, [however, share certain commonalities]. They receive prophetic visions only in a visionary dream or during the day after slumber has overtaken them, as [Numbers 12:6] states: "I make Myself known to him in a vision. I speak to him in a dream."
When any of them prophesy, their limbs tremble, their physical powers become weak, they lose control of their senses, and thus, their minds are free to comprehend what they see, as [Genesis 15:12] states concerning Abraham: "and a great, dark dread fell over him." Similarly, Daniel [10:8] states: "My appearance was horribly changed and I retained no strength."

הלכה ג
הַדְּבָרִים שֶׁמּוֹדִיעִים לַנָּבִיא בְּמַרְאֵה הַנְּבוּאָה דֶּרֶךְ מָשָׁל מוֹדִיעִין לוֹ וּמִיָּד יֵחָקֵק בְּלִבּוֹ פִּתְרוֹן הַמָּשָׁל בְּמַרְאֵה הַנְּבוּאָה וְיֵדַע מָה הוּא. כְּמוֹ הַסֻּלָּם שֶׁרָאָה יַעֲקֹב אָבִינוּ וּמַלְאָכִים עוֹלִים וְיוֹרְדִים בּוֹ וְהוּא הָיָה מָשָׁל לְמַלְכֻיּוֹת וְשִׁעְבּוּדָן. וּכְמוֹ הַחַיּוֹת שֶׁרָאָה יְחֶזְקֵאל וְהַסִּיר נָפוּחַ וּמַקֵּל שָׁקֵד שֶׁרָאָה יִרְמְיָה וְהַמְּגִלָּה שֶׁרָאָה יְחֶזְקֵאל וְהָאֵיפָה שֶׁרָאָה זְכַרְיָה. וְכֵן שְׁאָר הַנְּבִיאִים. מֵהֶם אוֹמְרִים הַמָּשָׁל וּפִתְרוֹנוֹ כְּמוֹ אֵלּוּ. וְיֵשׁ שֶׁהֵן אוֹמְרִים הַפִּתְרוֹן בִּלְבַד. וּפְעָמִים אוֹמְרִים הַמָּשָׁל בִּלְבַד בְּלֹא פִּתְרוֹן כְּמִקְצָת דִּבְרֵי יְחֶזְקֵאל וּזְכַרְיָה וְכֻלָּן בְּמָשָׁל וְדֶרֶךְ חִידָה הֵם מִתְנַבְּאִים:
כסף משנה
3.
When a prophet is informed of a message in a vision, it is granted to him in metaphoric imagery. Immediately, the interpretation of the imagery is imprinted upon his heart, and he knows its meaning.
For example, the ladder with the angels ascending and descending envisioned by the patriarch, Jacob, was an allegory for the empires and their subjugation [of his descendants]. Similarly, the creatures Ezekiel saw, the boiling pot and the rod from an almond tree envisioned by Jeremiah, the scroll Ezekiel saw, and the measure seen by Zechariah [were all metaphoric images]. This is also true with regard to the other prophets.
Some would relate the allegory and its explanation as these did. Others would relate only the explanation. At times, they would relate only the imagery without explaining it, as can be seen in some of the prophecies of Ezekiel and Zechariah.
All of the prophecies come in the form of metaphoric imagery and allegories.

הלכה ד
כָּל הַנְּבִיאִים אֵין מִתְנַבְּאִין בְּכָל עֵת שֶׁיִּרְצוּ אֶלָּא מְכַוְּנִים דַּעְתָּם וְיוֹשְׁבִים שְׂמֵחִים וְטוֹבֵי לֵב וּמִתְבּוֹדְדִים. שֶׁאֵין הַנְּבוּאָה שׁוֹרָה לֹא מִתּוֹךְ עַצְבוּת וְלֹא מִתּוֹךְ עַצְלוּת אֶלָּא מִתּוֹךְ שִׂמְחָה. לְפִיכָךְ בְּנֵי הַנְּבִיאִים לִפְנֵיהֶם נֵבֶל וְתֹף וְחָלִיל וְכִנּוֹר וְהֵם מְבַקְּשִׁים הַנְּבוּאָה. וְזֶהוּ שֶׁנֶּאֱמַר (שמואל א י ה) "וְהֵמָּה מִתְנַבְּאִים" כְּלוֹמַר מְהַלְּכִין בְּדֶרֶךְ הַנְּבוּאָה עַד שֶׁיִּנָּבְאוּ כְּמוֹ שֶׁאַתָּה אוֹמֵר פְּלוֹנִי מִתְגַּדֵּל:
כסף משנה
4.
All the prophets do not prophesy whenever they desire. Instead, they must concentrate their attention [upon spiritual concepts] and seclude themselves, [waiting] in a happy, joyous mood, because prophecy cannot rest upon a person when he is sad or languid, but only when he is happy.
Therefore, the prophets' disciples would always have a harp, drum, flute, and lyre [before them when] they were seeking prophecy. This is what is meant by the expression [I Samuel 10:5]: "They were prophesying" - i.e., following the path of prophecy until they would actually prophesy - as one might say, "So and so aspires to greatness."

הלכה ה
אֵלּוּ שֶׁהֵם מְבַקְּשִׁין לְהִתְנַבֵּא הֵם הַנִּקְרָאִים בְּנֵי הַנְּבִיאִים. וְאַף עַל פִּי שֶׁמְּכַוְּנִים דַּעְתָּם אֶפְשָׁר שֶׁתִּשְׁרֶה שְׁכִינָה עֲלֵיהֶן וְאֶפְשָׁר שֶׁלֹּא תִּשְׁרֶה:
כסף משנה
5.
Those who aspire to prophecy are called "the disciples of the prophets." Even though they concentrate their attention, it is possible that the Divine Presence will rest upon them, and it is possible that it will not rest upon them.

הלכה ו
כָּל הַדְּבָרִים שֶׁאָמַרְנוּ הֵם דֶּרֶךְ נְבוּאָה לְכָל הַנְּבִיאִים הָרִאשׁוֹנִים וְהָאַחֲרוֹנִים חוּץ מִמּשֶׁה רַבֵּנוּ רַבָּן שֶׁל כָּל הַנְּבִיאִים. וּמַה הֶפְרֵשׁ יֵשׁ בֵּין נְבוּאַת משֶׁה לִשְׁאָר כָּל הַנְּבִיאִים. שֶׁכָּל הַנְּבִיאִים בַּחֲלוֹם אוֹ בְּמַרְאֶה וּמשֶׁה רַבֵּנוּ מִתְנַבֵּא וְהוּא עֵר וְעוֹמֵד שֶׁנֶּאֱמַר (במדבר ז פט) "וּבְבֹא משֶׁה אֶל אֹהֶל מוֹעֵד לְדַבֵּר אִתּוֹ וַיִּשְׁמַע אֶת הַקּוֹל מִדַּבֵּר אֵלָיו". כָּל הַנְּבִיאִים עַל יְדֵי מַלְאָךְ. לְפִיכָךְ רוֹאִים מַה שֶּׁהֵם רוֹאִים בְּמָשָׁל וְחִידָה. משֶׁה רַבֵּנוּ לֹא עַל יְדֵי מַלְאָךְ שֶׁנֶּאֱמַר (במדבר יב ח) "פֶּה אֶל פֶּה אֲדַבֶּר בּוֹ". וְנֶאֱמַר (שמות לג יא) "וְדִבֶּר ה' אֶל משֶׁה פָּנִים אֶל פָּנִים". וְנֶאֱמַר (במדבר יב ח) "וּתְמֻנַת ה' יַבִּיט" כְּלוֹמַר שֶׁאֵין שָׁם מָשָׁל אֶלָּא רוֹאֶה הַדָּבָר עַל בֻּרְיוֹ בְּלֹא חִידָה וּבְלֹא מָשָׁל. הוּא שֶׁהַתּוֹרָה מְעִידָה עָלָיו (במדבר יב ח) "בְּמַרְאֶה וְלֹא בְּחִידוֹת" שֶׁאֵינוֹ מִתְנַבֵּא בְּחִידָה אֶלָּא בְּמַרְאֶה שֶׁרוֹאֶה הַדָּבָר עַל בֻּרְיוֹ. כָּל הַנְּבִיאִים יְרֵאִים וְנִבְהָלִים וּמִתְמוֹגְגִין וּמשֶׁה רַבֵּנוּ אֵינוֹ כֵן הוּא, שֶׁהַכָּתוּב אוֹמֵר (שמות לג יא) "כַּאֲשֶׁר יְדַבֵּר אִישׁ אֶל רֵעֵהוּ", כְּלוֹמַר כְּמוֹ שֶׁאֵין אָדָם נִבְהָל לִשְׁמֹעַ דִּבְרֵי חֲבֵרוֹ כָּךְ הָיָה כֹּחַ בְּדַעְתּוֹ שֶׁל משֶׁה רַבֵּנוּ לְהָבִין דִּבְרֵי הַנְּבוּאָה וְהוּא עוֹמֵד עַל עָמְדוֹ שָׁלֵם. כָּל הַנְּבִיאִים אֵין מִתְנַבְּאִים בְּכָל עֵת שֶׁיִּרְצוּ. משֶׁה רַבֵּנוּ אֵינוֹ כֵן אֶלָּא כָּל זְמַן שֶׁיַּחְפֹּץ רוּחַ הַקֹּדֶשׁ לוֹבַשְׁתּוֹ וּנְבוּאָה שׁוֹרָה עָלָיו וְאֵינוֹ צָרִיךְ לְכַוֵּן דַּעְתּוֹ וּלְהִזְדַּמֵּן לָהּ שֶׁהֲרֵי הוּא מְכֻוָּן וּמְזֻמָּן וְעוֹמֵד כְּמַלְאֲכֵי הַשָּׁרֵת. לְפִיכָךְ מִתְנַבֵּא בְּכָל עֵת שֶׁנֶּאֱמַר (במדבר ט ח) "עִמְדוּ וְאֶשְׁמְעָה מַה יְצַוֶּה ה' לָכֶם". וּבָזֶה הִבְטִיחוֹ הָאֵל שֶׁנֶּאֱמַר (גמרא יבמות סב א) "לֵךְ אֱמֹר לָהֶם שׁוּבוּ לָכֶם לְאָהֳלֵיכֶם וְאַתָּה פֹּה עֲמֹד עִמָּדִי". הָא לָמַדְתָּ שֶׁכָּל הַנְּבִיאִים כְּשֶׁהַנְּבוּאָה מִסְתַּלֶּקֶת מֵהֶם חוֹזְרִים לְאָהֳלָם שֶׁהוּא צָרְכֵי הַגּוּף כֻּלָּם כִּשְׁאָר הָעָם. לְפִיכָךְ אֵין פּוֹרְשִׁין מִנְּשׁוֹתֵיהֶם. וּמשֶׁה רַבֵּנוּ לֹא חָזַר לְאָהֳלוֹ הָרִאשׁוֹן לְפִיכָךְ פֵּרַשׁ מִן הָאִשָּׁה לְעוֹלָם וּמִן הַדּוֹמֶה לוֹ וְנִקְשְׁרָה דַּעְתּוֹ לְצוּר הָעוֹלָמִים וְלֹא נִסְתַּלֵּק מֵעָלָיו הַהוֹד לְעוֹלָם וְקָרַן עוֹר פָּנָיו וְנִתְקַדֵּשׁ כְּמַלְאָכִים:
כסף משנה
6.
All the statements made above describe the path of prophecy of all the early and later prophets, with the exception of Moses, our teacher, the master of all prophets.
What is the difference between Moses' prophecy and that of all the other prophets? [Divine insight is bestowed upon] all the [other] prophets in a dream or vision. Moses, our teacher, would prophesy while standing awake, as [Numbers 7:89] states: "When Moses came into the Tent of Meeting to speak to Him, he heard the Voice speaking to him."
[Divine insight is bestowed upon] all the [other] prophets through the medium of an angel. Therefore, they perceive only metaphoric imagery and allegories. Moses, our teacher, [would prophesy] without the medium of an angel, as [Numbers 12:8] states: "Mouth to mouth I speak to him," and [Numbers 12:8] states: "He gazes upon the image of God" - i.e., there was no metaphor. Rather, he would perceive the matter in its fullness, without metaphor or allegory. The Torah testifies concerning him [Numbers 12:8]: ["I speak to him...] manifestly, without allegory." His appreciation of prophecy would not be through metaphor, but through open revelation, appreciating the matter in its fullness. All the [other] prophets are overawed, terrified, and confounded [by the revelations they experience], but Moses, our teacher, would not [respond in this manner], as [Exodus 33:11] relates: "[God spoke to Moses...] as a man speaks to a friend" - i.e., just as a person will not be awe-struck from hearing his friend's words, so, too, Moses' mental power was sufficient to comprehend the words of prophecy while he was standing in a composed state.
All the [other] prophets cannot prophesy whenever they desire. Moses, our teacher, was different. Whenever he desired, the holy spirit would envelop him, and prophecy would rest upon him. He did not have to concentrate his attention to prepare himself [for prophecy], because his [mind] was always concentrated, prepared, and ready [to appreciate spiritual truth] as the angels [are]. Therefore, he would prophesy at all times, as [Numbers 9:8] states: "Stand and hear what God will command you."
He was promised this by God, as [implied by Deuteronomy 5:27-28]: "Go and tell them: `Return to your tents,' but you stand here together with Me." This should be interpreted to mean: When prophecy departs from all the [other] prophets, they return to their "tents" - i.e., the needs of the body like other people. Therefore, they do not separate themselves from their wives. Moses, our teacher, never returned to his original "tent." Therefore, he separated himself from women and everything of that nature forever. He bound his mind to the Eternal Rock. [Accordingly,] the glory never left him forever. The flesh of his countenance shone, [for] he became holy like the angels.

הלכה ז
הַנָּבִיא אֶפְשָׁר שֶׁתִּהְיֶה נְבוּאָתוֹ לְעַצְמוֹ בִּלְבַד לְהַרְחִיב לִבּוֹ וּלְהוֹסִיף דַּעְתּוֹ עַד שֶׁיֵּדַע מַה שֶּׁלֹּא הָיָה יוֹדֵעַ מֵאוֹתָן הַדְּבָרִים הַגְּדוֹלִים. וְאֶפְשָׁר שֶׁיְּשֻׁלַּח לְעַם מֵעַמֵּי הָאָרֶץ אוֹ לְאַנְשֵׁי עִיר אוֹ מַמְלָכָה לְכוֹנֵן אוֹתָם וּלְהוֹדִיעָם מַה יַּעֲשׂוּ אוֹ לְמָנְעָם מִמַּעֲשִׂים הָרָעִים שֶׁבִּידֵיהֶם. וּכְשֶׁמְּשַׁלְּחִים אוֹתוֹ נוֹתְנִין לוֹ אוֹת וּמוֹפֵת כְּדֵי שֶׁיֵּדְעוּ הָעָם שֶׁהָאֵל שְׁלָחוֹ בֶּאֱמֶת. וְלֹא כָּל הָעוֹשֶׂה אוֹת וּמוֹפֵת מַאֲמִינִים לוֹ שֶׁהוּא נָבִיא. אֶלָּא אָדָם שֶׁהָיִינוּ יוֹדְעִים בּוֹ מִתְּחִלָּתוֹ שֶׁהוּא רָאוּי לִנְבוּאָה בְּחָכְמָתוֹ וּבְמַעֲשָׂיו שֶׁנִּתְעַלָּה בָּהֶן עַל כָּל בְּנֵי גִּילוֹ וְהָיָה מְהַלֵּךְ בְּדַרְכֵי הַנְּבוּאָה בִּקְדֻשָּׁתָהּ וּבִפְרִישׁוּתָהּ וְאַחַר כָּךְ בָּא וְעָשָׂה אוֹת וּמוֹפֵת וְאָמַר שֶׁהָאֵל שְׁלָחוֹ מִצְוָה לִשְׁמֹעַ מִמֶּנּוּ שֶׁנֶּאֱמַר (דברים יח טו) "אֵלָיו תִּשְׁמָעוּן". וְאֶפְשָׁר שֶׁיַּעֲשֶׂה אוֹת וּמוֹפֵת וְאֵינוֹ נָבִיא. וְזֶה הָאוֹת יֵשׁ לוֹ דְּבָרִים בְּגוֹ. וְאַף עַל פִּי כֵן מִצְוָה לִשְׁמוֹעַ לוֹ הוֹאִיל וְאָדָם גָּדוֹל וְחָכָם וְרָאוּי לִנְבוּאָה [הוּא] מַעֲמִידִים אוֹתוֹ עַל חֶזְקָתוֹ. שֶׁבְּכָךְ נִצְטַוֵּינוּ כְּמוֹ שֶׁנִּצְטַוֵּינוּ לַחְתֹּךְ אֶת הַדִּין עַל פִּי שְׁנֵי עֵדִים כְּשֵׁרִים וְאַף עַל פִּי שֶׁאֶפְשָׁר שֶׁהֵעִידוּ בְּשֶׁקֶר הוֹאִיל וּכְשֵׁרִים הֵם אֶצְלֵנוּ מַעֲמִידִין אוֹתָן עַל כַּשְׁרוּתָן. וּבַדְּבָרִים הָאֵלּוּ וְכַיּוֹצֵא בָּהֶן נֶאֱמַר (דברים כט כח) "הַנִּסְתָּרֹת לַה' אֱלֹהֵינוּ וְהַנִּגְלֹת לָנוּ וּלְבָנֵינוּ". וְנֶאֱמַר (שמואל א טז ז) "כִּי הָאָדָם יִרְאֶה לַעֵינַיִם וַה' יִרְאֶה לַלֵּבָב":
כסף משנה
7.
There is the possibility that a prophet will experience prophecy for his own sake alone - i.e., to expand his mental capacities and to increase his knowledge - [allowing him] to know more about the lofty concepts than he knew before.
It is also possible that he will be sent to one of the nations of the world, or to the inhabitants of a particular city or kingdom, to prepare them and to inform them what they should do or to prevent them [from continuing] the evil which they are doing.
When he is sent [on such a mission], he is given a sign or a wonder [to perform], so that the people will know that God has truly sent him.
Not everyone who performs signs or wonders should be accepted as a prophet: only a person who is known to be fit for prophecy beforehand; i.e., his wisdom and his [good] deeds surpass those of all his contemporaries. If he follows the paths of prophecy in holiness, separating himself from worldly matters, and afterwards performs a sign or wonder and states that he was sent by God, it is a mitzvah to listen to him, as [Deuteronomy 18:15] states: "Listen to him."
It is possible that a person will perform a sign or wonder even though he is not a prophet - rather, the wonder will have [another cause] behind it. It is, nevertheless, a mitzvah to listen to him. Since he is a wise man of stature and fit for prophecy, we accept [his prophecy as true], for so have we been commanded.
[To give an example of a parallel:] We are commanded to render a [legal] judgment based on the testimony of two witnesses. Even though they may testify falsely, since we know them to be acceptable [as witnesses], we presume that they [are telling the truth].
Considering these matters and the like, [Deuteronomy 29:28] states: "The hidden matters are for God, our Lord, but what is revealed is for us and our children," and [I Samuel 16:7] states: "Man sees what is revealed to the eyes, but God sees into the heart."

מדע הלכות יסודי התורה פרק ז
Madda Yesodei haTorah Chapter 7