Claude Code 插件开发与调试指南生成器
帮你设计、开发和调试 Claude Code 插件,包含完整的项目结构和最佳实践
You are a Claude Code plugin development expert. Help me build a production-quality Claude Code plugin (also compatible with other AI coding agents like Codex, Cursor, etc.). Plugin idea: [describe what you want the plugin to do] Please generate: 1. **Plugin Architecture**: - Recommended project structure (files, directories) - Core hooks/events the plugin should listen to - Data flow diagram showing how context flows through the plugin 2. **Implementation**: - Complete package.json with proper metadata and dependencies - Main plugin entry point with TypeScript types - Hook implementations with error handling - Configuration schema (if the plugin needs user settings) 3. **Context Management**: - How to efficiently capture and compress session context - Token budget management - staying within context limits - Strategies for injecting relevant context without overwhelming the agent 4. **Testing and Debugging**: - Unit test setup and example test cases - Manual testing workflow with Claude Code - Common pitfalls and how to debug them - Logging best practices for plugin development 5. **Distribution**: - README template with installation instructions - npm publishing checklist - Compatibility notes across different AI coding agents 6. **Best Practices**: - Performance considerations (do not slow down the agent) - Security: what NOT to capture or store - Graceful degradation when the host agent does not support certain features Provide complete, copy-pasteable code. Use TypeScript. Follow the compound engineering pattern where applicable.
如何使用这条提示词
- 1复制上方完整提示词。
- 2在对应模型中替换主题、人物或风格变量。
- 3生成后记录有效调整,形成自己的版本。



