lwy-project-agent-writer
Use this skill when the user wants to create, update, or design a project-level agent (.agents/agents/*.md). Analyze the user's question and project context to design a work plan. Triggers: 'create agent', 'build an agent', 'add agent', 'design agent', 'update agent', 'project agent', 'subagent', 'worker agent', 'automated worker', or when the user describes a repetitive task that should be handled by an autonomous agent.
What this skill does
# Project Agent Writer
Analyze the project's structure, conventions, and automation gaps, then **design** an agent to solve the user's problem. Always confirm with the user via `AskUserQuestion` before generating any files.
> **Core principle**: First understand the problem, then analyze the project, then design the agent, and only generate after the user confirms.
> **Shared principle:** This skill shares the 5 common writer disciplines with `project-skill-writer` / `project-skill-installer` / `project-rules-writer`. See [../project-skill-writer/references/writer-discipline.md](../project-skill-writer/references/writer-discipline.md) for details.
## Use Cases
**Trigger when:**
- The user says "create an agent", "I need an agent that...", "make AI do X every time"
- The user describes an automation need ("someone to automatically...", "I want something that monitors...")
- The user wants to build a grader, comparator, analyzer, transformer, researcher, or validator
**Do not trigger when:**
- The user wants to **install** a skill → delegate to `project-skill-installer`
- The user wants to **create** a skill → delegate to `project-skill-writer`
- The user wants to **create** a rule → delegate to `project-rules-writer`
## Prerequisites
- Node.js >= 18
- The target project must have a writable directory for agent output
## Workflow
```
[L1: Understand the problem]
↓
[L2: Project analysis]
↓
[L3: Agent design]
↓
[L4: Confirm] ← AskUserQuestion (confirmation required)
↓
[L5: Generate]
↓
[L6: Verify]
```
## L1: Understand the Problem
Extract the user's needs—do not ask "what do you want the agent to do?" but infer from their question:
### Problem Classification
| Problem pattern | Agent type | Example |
|----------|------------|------|
| "evaluate/grade/compare output" | Grader | Code reviewer, PR quality checker |
| "compare A and B, pick the better one" | Comparator | Skill version comparison, A/B tester |
| "analyze/find patterns/report insights" | Analyzer | Bug finder, performance diagnostics |
| "convert/transform/normalize data" | Transformer | Format converter, schema mapper |
| "research/gather/synthesize information" | Researcher | Doc lookup, best practices |
| "check/validate/enforce rules" | Validator | Schema checker, compliance validator |
### Extract the Agent Spec
Extract from the user's question:
- **Role**: what the agent does (extracted from the problem description)
- **Input**: what triggers the agent / what data it needs
- **Output**: what the agent produces
- **Constraints**: boundaries and limitations
## L2: Project Analysis
Scan the project to understand context. Use search tools in parallel:
### Detection Targets
| Signal | What to look for | Tool |
|------|----------|------|
| Language | File extensions (`.ts`, `.py`, `.swift`, `.go`) | Glob |
| Framework | package.json dependencies, Podfile, go.mod, Cargo.toml | Read |
| Existing agents | `.agents/agents/`, `.trae/agents/`, `.claude/agents/`, `.cursor/agents/` | Glob |
| Existing skills | `.agents/skills/`, `.trae/skills/`, `.cursor/skills/` | Glob |
| Automation scripts | `scripts/`, `tools/`, `Makefile` targets | Glob |
| API interfaces | REST endpoints, GraphQL schema, gRPC protos | Grep |
| Conventions | Naming patterns, output formats, directory structure | LS |
### Analysis Output
```
Project: {name}
Language: {detected language}
Existing agents: {list or "none"}
Existing skills: {list or "none"}
Automation scripts: {list or "none"}
Integration points: {API, file patterns, tools}
Conventions: {naming, output format}
```
## L3: Agent Design
Based on the problem (L1) + analysis (L2), design the agent:
```
Agent: {name}
Problem: {the problem in the user's own words}
Role: {one-sentence description}
Type: {Grader|Comparator|Analyzer|Transformer|Researcher|Validator}
Trigger: {when the agent activates}
Input: {what data the agent needs}
Process: {high-level steps}
Output: {what the agent produces + format}
Constraints: {boundaries + what it should not do}
Files to create:
- {path/to/agent.md}
```
## L4: Confirm (AskUserQuestion required)
**Critical**: Present the design via `AskUserQuestion` before generating any files.
### AskUserQuestion Call
Use `AskUserQuestion`:
```json
{
"questions": [{
"question": "I've designed this agent based on your project. Should I create it?",
"header": "Agent",
"multiSelect": false,
"options": [
{
"label": "Create {agent-name} (Recommended)",
"description": "{type} agent — {one-sentence role}. Output: {path}"
},
{
"label": "Adjust design",
"description": "Let me refine the agent design before generating"
},
{
"label": "Skip",
"description": "Don't create an agent right now"
}
]
}]
}
```
**Rules**:
- Always show the designed agent's name and type
- Include the output path so the user knows where the file goes
- If multiple agent types are valid, offer alternatives:
```json
{
"questions": [{
"question": "Your problem could be solved by different agent types. Which approach fits best?",
"header": "Agent type",
"multiSelect": false,
"options": [
{
"label": "Grader agent (Recommended)",
"description": "Evaluates outputs against expectations with pass/fail evidence"
},
{
"label": "Validator agent",
"description": "Checks correctness against rules and suggests fixes"
},
{
"label": "Skip",
"description": "Don't create an agent right now"
}
]
}]
}
```
- Never generate files before the user confirms
- If the user says "adjust the design", return to L3 with the feedback
## L5: Generate
After the user confirms:
1. Use [path discovery](references/path-discovery.md) to determine the output path
2. Use `scripts/cli.cjs init` to create the agent scaffold
3. Fill in the role, input, process, and output from the L3 design
4. Set the correct project-relative output path
5. Include quality gates and constraints
### Generation Command
```bash
node scripts/cli.cjs init \
--skill-dir <this-skill-dir> \
--name <agent-name> \
--role "<one-sentence-role>" \
--output-dir <project>/.agents/agents/
```
## L6: Verify
Verify before delivery:
- [ ] The agent has a clear, specific role (not vague)
- [ ] Inputs are clearly defined and described
- [ ] The output schema is deterministic (JSON with known fields)
- [ ] Constraints are enforced (what it should not do)
- [ ] The output path is project-relative, not global
- [ ] The agent follows the conventions from the L2 analysis
### Delivery Report
```
Agent created:
Name: {agent-name}
Type: {Grader|Comparator|Analyzer|...}
Path: {project-relative path}
Usage: Launch this agent via the Task tool using its defined inputs.
```
## Error Handling
| Problem | Solution |
|------|----------|
| User's question is too vague | Infer the most likely agent type from context, confirm at L4 |
| Multiple valid agent types | Present alternatives in AskUserQuestion and let the user choose |
| No agent directory exists | Create `.agents/agents/` |
| User requests creating a skill/rule | Route to `project-skill-writer` or `project-rules-writer` |
| User says "adjust the design" at L4 | Return to L3 and incorporate the feedback |
| Output path is global | Reject, enforce a project-relative path |
| Agent conflicts with an existing one | Show a comparison, ask the user whether to replace or rename |
## Scope
This skill handles **only**:
- Analyzing the project for agent design context
- Designing the agent based on the user's problem
- Confirming the design via AskUserQuestion
- Generating the agent file to a project-relative path
- Verifying the generated agent
This skill does **not** handle:
- Creating skills → `project-skill-writer`
- Installing skills → `project-skill-installer`
- Creating rules → `project-rules-writer`
- Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.