generate-subsystem-skills
π―Skillfrom llama-farm/llamafarm
Generates specialized Claude Code skills for each subsystem, creating shared language and subsystem-specific checklists to optimize AI code generation across the monorepo.
Installation
npx skills add https://github.com/llama-farm/llamafarm --skill generate-subsystem-skillsSkill Details
Generate specialized skills for each subsystem in the monorepo. Creates shared language skills and subsystem-specific checklists for high-quality AI code generation.
Overview
# Generate Subsystem Skills
This skill analyzes each subsystem in the LlamaFarm monorepo and generates specialized Claude Code skills for security, performance, and language-specific best practices.
Usage
```
/generate-subsystem-skills
```
---
What Gets Generated
Shared Language Skills (4)
python-skills/- Used by: server, rag, runtime, config, commongo-skills/- Used by: clitypescript-skills/- Used by: designer, electronreact-skills/- Used by: designer
Subsystem-Specific Skills (8)
cli-skills/- Cobra, Bubbletea patternsserver-skills/- FastAPI, Celery, Pydantic patternsrag-skills/- LlamaIndex, ChromaDB patternsruntime-skills/- PyTorch, Transformers patternsdesigner-skills/- TanStack Query, Tailwind, Radix patternselectron-skills/- Electron IPC, security patternsconfig-skills/- Pydantic, JSONSchema patternscommon-skills/- HuggingFace Hub patterns
---
Generation Process
Step 1: Read Registry
Load subsystem definitions from [subsystem-registry.md](subsystem-registry.md).
Step 2: Generate Shared Language Skills
Launch sub-agents IN PARALLEL to generate:
- Python Skills Agent - Analyze Python subsystems (server, rag, runtime, config, common), identify ideal patterns, generate
python-skills/
- Go Skills Agent - Analyze CLI subsystem, identify ideal Go patterns, generate
go-skills/
- TypeScript Skills Agent - Analyze designer and electron, identify ideal TS patterns, generate
typescript-skills/
- React Skills Agent - Analyze designer, identify ideal React 18 patterns, generate
react-skills/
Step 3: Generate Subsystem Skills
Launch sub-agents IN PARALLEL for each subsystem:
For each subsystem, the agent should:
- Read the subsystem's dependency files (package.json, pyproject.toml, go.mod)
- Analyze code patterns using Grep and Read
- Generate SKILL.md that links to shared language skills
- Generate framework-specific checklist files
- Write all files to
.claude/skills/{subsystem}-skills/
Step 4: Report Summary
After all agents complete, report:
- Number of skills generated
- Total files created
- Any errors encountered
---
Sub-Agent Prompt Templates
For Shared Language Skills
```
You are generating a shared {LANGUAGE} skills directory for Claude Code.
Analyze these subsystems that use {LANGUAGE}:
{SUBSYSTEM_PATHS}
Your task:
- Read key files to understand patterns used
- When patterns vary, document the IDEAL approach (not inconsistencies)
- Reference industry best practices
- Generate files in .claude/skills/{LANGUAGE}-skills/
Files to generate:
- SKILL.md (overview, ~100 lines)
- patterns.md (idiomatic patterns)
- error-handling.md
- testing.md
- security.md
- {additional language-specific files}
Each checklist item should have:
- Description of what to check
- Search pattern (grep command)
- Pass/fail criteria
- Severity level
```
For Subsystem Skills
```
You are generating subsystem-specific skills for {SUBSYSTEM} in Claude Code.
Directory: {PATH}
Tech Stack: {TECH_STACK}
Links to: {SHARED_SKILLS}
Your task:
- Read dependency files and key source files
- Identify framework-specific patterns
- Generate SKILL.md that links to shared language skills
- Generate framework-specific checklists
Files to generate:
- SKILL.md (overview with links to shared skills)
- {framework}.md for each framework used
- performance.md (subsystem-specific optimizations)
Remember: Document IDEAL patterns, not existing inconsistencies.
```
---
Key Principle
Prescribe ideal patterns - When the codebase has inconsistent patterns, the generated skills should document the BEST practice according to industry standards, not codify existing inconsistencies.
---
Output Location
All skills are written to .claude/skills/ with this structure:
```
.claude/skills/
βββ python-skills/ # Shared
βββ go-skills/ # Shared
βββ typescript-skills/ # Shared
βββ react-skills/ # Shared
βββ cli-skills/ # Subsystem
βββ server-skills/ # Subsystem
βββ rag-skills/ # Subsystem
βββ runtime-skills/ # Subsystem
βββ designer-skills/ # Subsystem
βββ electron-skills/ # Subsystem
βββ config-skills/ # Subsystem
βββ common-skills/ # Subsystem
```
More from this repository10
Implements robust RAG document processing and retrieval using LlamaIndex, ChromaDB, and Celery for efficient, scalable AI document workflows.
Manages shared Python utilities for LlamaFarm, focusing on HuggingFace model handling, GGUF file management, and cross-service consistency.
Configures secure Electron desktop application architecture with isolated processes, type-safe IPC, and cross-platform packaging for LlamaFarm.
Enforces Go best practices and idiomatic patterns for secure, maintainable LlamaFarm CLI development.
Enforces strict TypeScript best practices for React and Electron frontend applications, ensuring type safety, immutability, and clean code patterns.
Provides comprehensive Go CLI development guidelines using Cobra, Bubbletea, and Lipgloss for creating robust, interactive command-line interfaces in LlamaFarm projects.
Automates git workflow by committing changes, pushing to GitHub, and opening a PR with intelligent checks and handling of edge cases.
Provides comprehensive Python best practices and code review guidelines for ensuring high-quality, secure, and maintainable code across LlamaFarm's Python components.
Generates temporary files in a structured system directory, ensuring clean organization and easy tracking of generated reports and logs.
Provides server-side best practices and code review guidelines for FastAPI, Celery, and Pydantic frameworks in Python.