프롬프트 라이브러리를 사용하여 자주 사용하는 프롬프트를 저장하고 관리하며 필요할 때 빠르게 불러올 수 있습니다. 다양한 파일이나 코드 섹션에 자주 사용하는 프롬프트가 있는 경우 프롬프트 실행 중에 선택한 코드나 파일로 자동 대체되는 프롬프트 템플릿 변수를 사용할 수 있습니다. 이 간소화된 워크플로를 사용하면 자주 사용하는 프롬프트를 다시 입력할 필요가 없어 시간과 노력을 절약할 수 있습니다.
프롬프트에 이름을 지정합니다. 이 이름은 편집기에서 프롬프트를 적용하려는 경우 프롬프트 라이브러리 메뉴에 표시됩니다.
제공된 필드에 프롬프트를 입력합니다. 프롬프트에 특정 코드를 참조하는 내용이 포함된 경우 프롬프트에서 다음 변수를 사용하여 프롬프트 실행 중에 관련 코드를 추가할 수 있습니다.
$SELECTION - 선택된 텍스트 또는 텍스트가 선택되지 않은 경우 커서 주변의 텍스트를 나타냅니다.
$CURRENT_FILE - 현재 편집기에서 활성화된 파일의 모든 텍스트를 나타냅니다.
선택사항: 프롬프트가 프롬프트 라이브러리 메뉴에 표시되지 않도록 하려면 프롬프트 라이브러리 메뉴에 표시를 선택 해제합니다.
변경사항을 적용하고 다른 설정을 계속 구성하려면 적용을 클릭합니다.
변경사항을 적용하고 설정 대화상자를 즉시 종료하려면 확인을 클릭합니다.
채팅에서 프롬프트를 마우스 오른쪽 버튼으로 클릭하여 나중에 사용할 수 있도록 저장할 수도 있습니다. 저장된 프롬프트를 적용하려면 편집기에서 마우스 오른쪽 버튼을 클릭하고 Gemini > 프롬프트 라이브러리로 이동하여 프롬프트를 적용합니다.
저장된 프롬프트 사용
프롬프트 라이브러리의 프롬프트를 사용하려면 다음 단계를 따르세요.
사용할 프롬프트에 해당하는 코드를 강조 표시합니다(해당하는 경우). 프롬프트가 특정 코드를 참조하지 않는 경우 파일에서 커서가 어디에 있든 상관없습니다.
프롬프트 목록을 가져오려면 편집기에서 마우스 오른쪽 버튼을 클릭하고 Gemini > 프롬프트 라이브러리로 이동합니다.
프롬프트를 Gemini에 제출하려면 메뉴에서 프롬프트를 선택합니다.
프로젝트 수준 프롬프트 공유 및 관리
동일한 프로젝트에서 작업하는 팀원과 프로젝트 수준 프롬프트를 공유하고 관리할 수 있습니다. 프롬프트 라이브러리에서 프로젝트 수준으로 프롬프트를 저장하면 프롬프트가 <project-root>/.idea/project.prompts.xml에 저장됩니다. 프로젝트 수준 프롬프트를 공유하고 관리하려면 .idea 폴더를 버전 제어 시스템에 추가하세요.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-31(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-31(UTC)"],[],[],null,["# Save and manage prompts with the Prompt Library\n\nUse the Prompt Library to save and manage your frequently used prompts and\nquickly recall them when needed. If there's a prompt that you use often for\ndifferent files or different sections of code, you can use a prompt template\nvariable that is automatically replaced with the selected code or file during\nprompt execution. This streamlined workflow eliminates the need to retype\ncommonly used prompts, saving you time and effort.\n\nTo open the Prompt Library, go to **File** (**Android Studio** on macOS)\n**Settings \\\u003e Tools \\\u003e Gemini \\\u003e Prompt Library**.\n\nSave a prompt\n-------------\n\nTo add a prompt, follow these steps:\n\n1. Open the Prompt Library by clicking **File** (**Android Studio** on macOS) **\\\u003e Settings \\\u003e Tools \\\u003e Gemini \\\u003e Prompt Library**.\n2. To set the scope of the prompt, use the **Scope** drop-down:\n - IDE-level rules are private to yourself and can be used across multiple projects.\n - Project-level rules can be [shared among teammates](#share-project-prompts) working on the same project.\n3. To add a new prompt, click **Add** .\n4. Give the prompt a name. This name is what appears in the [Prompt Library menu](#use-saved-prompt) if you want to apply the prompt from the editor.\n5. Enter the prompt in the field provided. If the prompt involves referencing specific code, you can add the relevant code during prompt execution by using the following variables in your prompt:\n - `$SELECTION` - Represents the selected text, or text surrounding the cursor if no text is selected.\n - `$CURRENT_FILE` - Represents all the text in the file that's currently active in the editor.\n6. Optional: If you don't want the prompt to show up in the [Prompt Library menu](#use-saved-prompt), un-check **Show in Prompt Library menu**.\n7. To apply the changes and continue configuring other settings, click **Apply** . To apply the changes and immediately exit the settings dialog, click **Ok**.\n\nYou can also right-click on a prompt in chat to save it for later use. To apply\na saved prompt, right-click in the Editor and navigate to **Gemini \\\u003e Prompt\nLibrary** to apply the prompt.\n\nUse a saved prompt\n------------------\n\nTo use a prompt from the Prompt Library, follow these steps:\n\n1. Highlight the relevant code, if applicable to the prompt that you're planning to use. If the prompt doesn't reference specific code, it doesn't matter where your cursor is in the file.\n2. To get your list of prompts, right-click in the editor and go to **Gemini \\\u003e Prompt Library**.\n3. To submit the prompt to Gemini, select the prompt from the menu.\n\nShare and manage project-level prompts\n--------------------------------------\n\nYou can share and manage project-level prompts with teammates working on the\nsame project. When you save a prompt at the project level in the Prompt Library,\nthe prompt is stored at `\u003cproject-root\u003e/.idea/project.prompts.xml`. To share and\nmanage project-level prompts, add the `.idea` folder to your version control\nsystem."]]