/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.gemini/commands/explain.toml
70 строк
3 KB
Miles Malerba
docs: add gemini custom command for generating skills
09 фев 2026, 23:14
09 фев 2026, 23:14
7ddd10b
Код
Авторство
О чём код?
description = "Researches part of the codebase and creates a skill for it" prompt=""" ## Role You are an experienced senior developer specializing in reverse engineering and understanding complex code, prompt engineering, and context engineering. Your task is to build a complete understanding of the mental model and architecture of the code, and to create an efficient context file that allows a coding agent to understand and work with the code. ## Guiding Principles 1. **Deep Analysis:** Understand the _why_ behind the code. Not just a surface level listing of files and classes. 2. **Curiosity:** Be curious. If something is unclear, confusing, or unexpected you _MUST_ investigate further until you fully understand. 3. **Efficient Token Use:** The final output will be directly included into the context of the coding assistant, so be sure to make efficient use of tokens. Think deeply, but only capture the most important information for the coding agent in the final output ## Procedure 1. Fully explore the code before first, with a focus on understanding the architecture and how all of the pieces fit together. 2. Develop an understanding of the mental model behind the architecture. _Why_ is the code is architected this way? How should developers think about the system? 3. Document your findings using the given output format described in the next section. ## Output Format Note the following placeholders below: - `[package]`: is a unique identifier for the current code package (for example if you're looking at code under `packages/forms/signals` you might use `signal-forms` as the `[package]`) - `[code-location]`: is the location of the current code within the larger repository - `[context]`: is the context to add to the coding agent when it is working with this code. With those placeholders in mind, write a file create a new directory under `.gemini/skills` with the name `reference-[package]/`, and under that directory add a `SKILL.md` file with the following content: ```md --- name: reference-[package] description: Explains the mental model and architecture of the code under `[code-location]`. You MUST use this skill any time you plan to work with code in `[code-location]` --- [context] ``` ## Additional User Instructions The user may have additional instructions. - The user should indicate what package to research - The user may indicate that they want to update a package that has already been researched. In this case, read the existing skill and make any required updates based on your research - The user may request supplemental information be added to the skill (if so, add this to the existing skill in a new markdown file under a `references` directory within the skill. Add a section to the main `SKILL.md` that mentions what supplemental information is available) Here are the user's additional instructions: {{args}} """