System Prompt
Codegen provides a.txt
file that you can drag-and-drop into any chat assistant. This is roughly 60k tokens and will enable chat assistants like, ChatGPT, Claude 3.5 etc. to build effectively with Codegen.
Download System Prompt
Download System Prompt
Learn about leveraging this in IDE chat assistants like Cursor here
Generating System Prompts
The Codegen CLI provides commands to generate.md
files that can be fed to any AI assistant for more accurate and contextual help.
When you create a new codemod via codegen create:
- An introduction to Codegen
- Codegen API documentation
- Examples of relevant transformations
.codegen/prompts/<codemod-name>-system-prompt.md
file.
All contents of the
.codegen/prompts
directory are by default ignored the
.gitignore
file. after running codegen init.md
file can be used with any AI assistant (Claude, GPT-4, etc.) to get more accurate and contextual help.
Example Workflow
1
Create a codemod with description
Use the create command with a detailed description of what you want to accomplish:
2
Review the generated system prompt
Check the AI context that Codegen generated for your transformation:
bash cat codegen-sh/codemods/modernize-components/prompt.md
3
Iterate in Copilot, Cursor or Windsurf
Reference your codemod when asking questions to get contextual help:
@codegen-sh/codemods/modernize-components How should I handle componentDidMount?
4
Get contextual help
The AI will understand you’re working on React modernization and provide relevant suggestions about using useEffect hooks and other modern React patterns.
Copilot, Cursor and Windsurf (IDEs)
When using IDE chat assistants, you can leverage Codegen’s context by mentioning your codemod in composer mode:Devin, OpenHands and Semi-autonomous Code Agents
Coming soon!