AIBlueprint by Melvynx : agents spécialisés, workflows autonomes (Ralph Loop), hooks sécurité, skills Git/Meta/Utils

GitHub stars
9

Install

/plugin install mlvn@atournayre-claude-plugin-marketplace

Run it inside Claude Code after adding the marketplace with /plugin marketplace add atournayre/claude-marketplace.

Contents

Discovered from source

Skills 7

Commit

Quick commit with conventional message format, then push.

Context

  • Git state: !git status
  • Staged changes: !git diff --cached --stat
  • Unstaged changes: !git diff --stat
  • Recent commits: !git log --oneline -5
  • Current branch: !git branch --show-current

Workflow

  1. Analyze: Review git status

    • Nothing staged but unstaged changes exist: git add .
    • Nothing to commit: inform user and exit
  2. Generate commit message:

    • Format: type(scope): brief description
    • Types: feat, fix, update, docs, chore, refactor, test, perf, revert
    • Under 72 chars, imperative mood, lowercase after colon
    • Example: update(statusline): refresh spend data
  3. Commit: git commit -m "message"

  4. Push: git push

Rules

  • SPEED OVER PERFECTION: Generate one good message and commit
  • NO INTERACTION: Never ask questions - analyze and commit
  • AUTO-STAGE: If nothing staged, stage everything
  • AUTO-PUSH: Always push after committing
  • IMPERATIVE MOOD: "add", "update", "fix" not past tense

Create PR

Create pull request with concise, meaningful description.

Context

  • Current branch: !git branch --show-current
  • Working tree status: !git status --short
  • Recent commits: !git log --oneline -5
  • Remote tracking: !git rev-parse --abbrev-ref @{upstream} 2>/dev/null || echo "none"

Workflow

  1. Verify: Check git status and current branch
  2. Branch Safety: CRITICAL - If on main/master, create descriptive branch from changes
  3. Push: git push -u origin HEAD
  4. Analyze: git diff origin/main...HEAD --stat
  5. Generate PR:
    • Title: One-line summary (max 72 chars)
    • Body: Bullet points of key changes
  6. Submit: gh pr create --title "..." --body "..."
  7. Return: Display PR URL

PR Format

## Summary

• [Main change or feature]
• [Secondary changes]
• [Any fixes included]

## Type

[feat/fix/refactor/docs/chore]

Rules

  • NO verbose descriptions
  • NO "Generated with" signatures
  • Auto-detect base branch (main/master/develop)
  • Use HEREDOC for multi-line body
  • If PR exists, return existing URL

User: $ARGUMENTS

Merge

Merge branches intelligently by understanding feature context and resolving conflicts efficiently.

Context

  • Current branch: !git branch --show-current
  • Working tree status: !git status --short
  • Target branch: $1
  • Recent commits: !git log --oneline -5

Workflow

  1. CONTEXT GATHERING:

    • git branch --show-current to identify current branch
    • git status to ensure clean working tree
    • CRITICAL: Abort if uncommitted changes exist
  2. FEATURE ANALYSIS:

    • Search PR with gh pr list --head <branch-name>
    • Get PR details with gh pr view <number> --json title,body,files
    • Use Task agents to gather context from PR/issue descriptions
  3. MERGE ATTEMPT:

    • git fetch origin <branch-name>
    • git merge origin/<branch-name> --no-commit
    • Check status with git status --porcelain
  4. CONFLICT DETECTION:

    • Clean merge: git commit with descriptive message
    • Conflicts: Parse git diff --name-only --diff-filter=U
  5. SMART RESOLUTION: For each conflicted file:

    • Read file to understand conflict markers
    • Apply resolution based on context:
      • Feature additions: Keep both if non-overlapping
      • Bug fixes: Prefer incoming if fixing known issue
      • Refactors: Analyze intent and merge carefully
    • Use MultiEdit to resolve all conflicts
    • STOP: If >10 files conflicted, ask user
  6. VERIFICATION:

    • git diff --cached to review changes
    • Check no conflict markers remain: grep -r "<<<<<<< HEAD"
    • git add -A and commit

Conflict Resolution by Type

  • package.json: Merge dependencies, prefer higher versions
  • Config files: Combine settings unless mutually exclusive
  • Source code: Use PR/issue context to understand intent
  • Tests: Keep all tests unless duplicates
  • Imports: Merge all, deduplicate

Rules

  • ALWAYS gather context before merging
  • NEVER blindly accept theirs/ours without analysis
  • ABORT if conflicts exceed 10 files
  • Max 3 resolution attempts per file
  • If stuck: git merge --abort and report blockers
Create highly effective prompts using proven techniques from Anthropic and OpenAI research. This skill covers all major prompting methodologies: clarity, structure, examples, reasoning, and advanced patterns.

Every prompt created should be clear, specific, and optimized for the target model.

<quick_start>

  1. Clarify purpose: What should the prompt accomplish?
  2. Identify model: Claude, GPT, or other (techniques vary slightly)
  3. Select techniques: Choose from core techniques based on task complexity
  4. Structure content: Use XML tags (Claude) or markdown (GPT) for organization
  5. Add examples: Include few-shot examples for format-sensitive outputs
  6. Define success: Add clear success criteria
  7. Test and iterate: Refine based on outputs

<core_structure> Every effective prompt has:

<context>
Background information the model needs
</context>

<task>
Clear, specific instruction of what to do
</task>

<requirements>
- Specific constraints
- Output format
- Edge cases to handle
</requirements>

<examples>
Input/output pairs demonstrating expected behavior
</examples>

<success_criteria>
How to know the task was completed correctly
</success_criteria>

</core_structure> </quick_start>

<core_techniques> Priority: Always apply first

  • State exactly what you want
  • Avoid ambiguous language ("try to", "maybe", "generally")
  • Use "Always..." or "Never..." instead of "Should probably..."
  • Provide specific output format requirements

See: references/clarity-principles.md

**When**: Claude prompts, complex structure needed

Claude was trained with XML tags. Use them for:

  • Separating sections: <context>, <task>, <output>
  • Wrapping data: <document>, <schema>, <example>
  • Defining boundaries: Clear start/end of sections

See: references/xml-structure.md

**When**: Output format matters, pattern recognition easier than rules

Provide 2-4 input/output pairs:

<examples>
<example number="1">
<input>User clicked signup button</input>
<output>track('signup_initiated', { source: 'homepage' })</output>
</example>
</examples>

See: references/few-shot-patterns.md

**When**: Complex reasoning, math, multi-step analysis

Add explicit reasoning instructions:

  • "Think step by step before answering"
  • "First analyze X, then consider Y, finally conclude Z"
  • Use <thinking> tags for Claude's extended thinking

See: references/reasoning-techniques.md

**When**: Setting persistent behavior, role, constraints

System prompts set the foundation:

  • Define Claude's role and expertise
  • Set constraints and boundaries
  • Establish output format expectations

See: references/system-prompt-patterns.md

**When**: Enforcing specific output format (Claude-specific)

Start Claude's response to guide format:

Assistant: {"result":

Forces JSON output without preamble.

**When**: Long-running tasks, multi-session work, large context usage

For Claude 4.5 with context awareness:

  • Inform about automatic context compaction
  • Add state tracking (JSON, progress.txt, git)
  • Use test-first patterns for complex implementations
  • Enable autonomous task completion across context windows

See: references/context-management.md </core_techniques>

<prompt_creation_workflow> <step_0> Gather requirements using AskUserQuestion:

  1. What is the prompt's purpose?

    • Generate content
    • Analyze/extract information
    • Transform data
    • Make decisions
    • Other
  2. What model will use this prompt?

    • Claude (use XML tags)
    • GPT (use markdown structure)
    • Other/multiple
  3. What complexity level?

    • Simple (single task, clear output)
    • Medium (multiple steps, some nuance)
    • Complex (reasoning, edge cases, validation)
  4. Output format requirements?

    • Free text
    • JSON/structured data
    • Code
    • Specific template </step_0>

<step_1> Draft the prompt using this template:

<context>
[Background the model needs to understand the task]
</context>

<objective>
[Clear statement of what to accomplish]
</objective>

<instructions>
[Step-by-step process, numbered if sequential]
</instructions>

<constraints>
[Rules, limitations, things to avoid]
</constraints>

<output_format>
[Exact structure of expected output]
</output_format>

<examples>
[2-4 input/output pairs if format matters]
</examples>

<success_criteria>
[How to verify the task was done correctly]
</success_criteria>

</step_1>

<step_2> Apply relevant techniques based on complexity:

  • Simple: Clear instructions + output format
  • Medium: Add examples + constraints
  • Complex: Add reasoning steps + edge cases + validation </step_2>

<step_3> Review checklist:

  • Is the task clearly stated?
  • Are ambiguous words removed?
  • Is output format specified?
  • Are edge cases addressed?
  • Would a person with no context understand it? </step_3> </prompt_creation_workflow>

<anti_patterns> ❌ "Help with the data" ✅ "Extract email addresses from the CSV, remove duplicates, output as JSON array"

❌ "Don't use technical jargon" ✅ "Write in plain language suitable for a non-technical audience" ❌ Describing format in words only ✅ Showing 2-3 concrete input/output examples ❌ "Process the file" ✅ "Process the file. If empty, return []. If malformed, return error with line number."

See: references/anti-patterns.md </anti_patterns>

<reference_guides> Core principles:

Techniques:

Best practices by vendor:

Quality:

<success_criteria> A well-crafted prompt has:

  • Clear, unambiguous objective
  • Specific output format with example
  • Relevant context provided
  • Edge cases addressed
  • No vague language (try, maybe, generally)
  • Appropriate technique selection for task complexity
  • Success criteria defined </success_criteria>

Fix Errors

Fix all ESLint and TypeScript errors by breaking them into areas and processing in parallel.

Workflow

  1. DISCOVER COMMANDS: Check package.json for exact script names

    • Look for: lint, typecheck, type-check, tsc, eslint, prettier, format
  2. RUN DIAGNOSTICS:

    • Run pnpm run lint (or equivalent)
    • Run pnpm run typecheck or tsc --noEmit
    • Capture all error output
  3. ANALYZE ERRORS:

    • Extract file paths from error messages
    • Group errors by file location
    • Count total errors and affected files
  4. CREATE ERROR AREAS:

    • MAX 5 FILES PER AREA
    • Group related files together (same directory/feature)
    • Example: Area 1: [file1, file2, file3, file4, file5]
  5. PARALLEL PROCESSING: Launch snipper agents for each area

    • Use Task tool with multiple agents simultaneously
    • Each agent processes one area (max 5 files)
    • Provide specific error details for each file
  6. VERIFICATION: Re-run diagnostics after fixes

    • Wait for all agents to complete
    • Re-run lint and typecheck
    • Report remaining errors
  7. FORMAT CODE: Apply Prettier (if available)

    • Run pnpm run format or equivalent

Snipper Agent Instructions

Fix all ESLint and TypeScript errors in these files:
[list of files with their specific errors]

Focus only on these files. Make minimal changes to fix errors while preserving functionality.

Rules

  • ALWAYS check package.json first for correct commands
  • ONLY fix linting and TypeScript errors
  • NO feature additions - minimal fixes only
  • PARALLEL ONLY - use Task tool for concurrent processing
  • Every error must be assigned to an area

User: $ARGUMENTS

Execute systematic implementation workflows using the APEX methodology. This skill uses progressive step loading to minimize context usage and supports saving outputs for review and resumption.

<quick_start> Basic usage:

/apex add authentication middleware

Recommended workflow (autonomous with save):

/apex -a -s implement user registration

Flags:

  • -a (auto): Skip confirmations
  • -s (save): Save outputs to .claude/output/apex/
  • -e (economy): No subagents, save tokens

See <parameters> for complete flag list. </quick_start>

**Enable flags (turn ON):** | Short | Long | Description | |-------|------|-------------| | `-a` | `--auto` | Autonomous mode: skip confirmations, auto-approve plans | | `-s` | `--save` | Save mode: output each step to `.claude/output/apex/` | | `-e` | `--economy` | Economy mode: no subagents, save tokens (for limited plans) | | `-r` | `--resume` | Resume mode: continue from a previous task | | `-b` | `--branch` | Branch mode: verify not on main, create branch if needed | | `-i` | `--interactive` | Interactive mode: configure flags via AskUserQuestion |

Disable flags (turn OFF):

ShortLongDescription
-A--no-autoDisable auto mode
-S--no-saveDisable save mode
-E--no-economyDisable economy mode
-B--no-branchDisable branch mode
```bash # Basic /apex add auth middleware

Autonomous (skip confirmations)

/apex -a add auth middleware

Save outputs

/apex -a -s add auth middleware

Resume previous task

/apex -r 01-auth-middleware /apex -r 01 # Partial match

Economy mode (save tokens)

/apex -e add auth middleware

Interactive flag config

/apex -i add auth middleware

Disable flags (uppercase)

/apex -A add auth middleware # Disable auto

</examples>

<parsing_rules>
**Flag parsing:**

1. Defaults loaded from `steps/step-00-init.md` `<defaults>` section
2. Command-line flags override defaults (enable with lowercase `-x`, disable with uppercase `-X`)
3. Flags removed from input, remainder becomes `{task_description}`
4. Task ID generated as `NN-kebab-case-description`

For detailed parsing algorithm, see `steps/step-00-init.md`.
</parsing_rules>

</parameters>

<output_structure>
**When `{save_mode}` = true:**

All outputs saved to PROJECT directory (where Claude Code is running):

.claude/output/apex/{task-id}/ ├── 00-context.md # Params, user request, timestamp ├── 01-analyze.md # Analysis findings ├── 02-plan.md # Implementation plan ├── 03-execute.md # Execution log └── 04-validate.md # Validation results


**00-context.md structure:**
```markdown
# APEX Task: {task_id}

**Created:** {timestamp}
**Task:** {task_description}

## Flags
- Auto mode: {auto_mode}
- Save mode: {save_mode}
- Economy mode: {economy_mode}

## User Request
{original user input}

## Acceptance Criteria
- [ ] AC1: {inferred criterion}
- [ ] AC2: {inferred criterion}

</output_structure>

<resume_workflow> Resume mode (-r {task-id}):

When provided, step-00 will:

  1. Locate the task folder in .claude/output/apex/
  2. Restore state from 00-context.md
  3. Find the last completed step
  4. Continue from the next step

Supports partial matching (e.g., -r 01 finds 01-add-auth-middleware).

For implementation details, see steps/step-00-init.md. </resume_workflow>

**Standard flow:** 1. Parse flags and task description 2. If `-r`: Execute resume workflow 3. If `-s`: Create output folder and 00-context.md 4. Load step-01-analyze.md → gather context 5. Load step-02-plan.md → create strategy 6. Load step-03-execute.md → implement 7. Load step-04-validate.md → verify and complete

<state_variables> Persist throughout all steps:

VariableTypeDescription
{task_description}stringWhat to implement (flags removed)
{feature_name}stringKebab-case name without number (e.g., add-auth-middleware)
{task_id}stringFull identifier with number (e.g., 01-add-auth-middleware)
{acceptance_criteria}listSuccess criteria (inferred or explicit)
{auto_mode}booleanSkip confirmations, use recommended options
{save_mode}booleanSave outputs to .claude/output/apex/
{economy_mode}booleanNo subagents, direct tool usage only
{branch_mode}booleanVerify not on main, create branch if needed
{interactive_mode}booleanConfigure flags interactively
{resume_task}stringTask ID to resume (if -r provided)
{output_dir}stringFull path to output directory
{branch_name}stringCreated branch name (if branch_mode)

</state_variables>

<entry_point>

FIRST ACTION: Load steps/step-00-init.md

Step 00 handles:

  • Flag parsing (-a, -x, -s, -r, --test)
  • Resume mode detection and task lookup
  • Output folder creation (if save_mode)
  • 00-context.md creation (if save_mode)
  • State variable initialization

After initialization, step-00 loads step-01-analyze.md.

</entry_point>

<step_files> Progressive loading - only load current step:

StepFilePurpose
00steps/step-00-init.mdParse flags, create output folder, initialize state
01steps/step-01-analyze.mdSmart context gathering with 1-10 parallel agents based on complexity
02steps/step-02-plan.mdFile-by-file implementation strategy
03steps/step-03-execute.mdTodo-driven implementation
04steps/step-04-validate.mdSelf-check, validation, and workflow completion

</step_files>

<execution_rules>

  • Load one step at a time - Only load the current step file
  • ULTRA THINK before major decisions
  • Persist state variables across all steps
  • Follow next_step directive at end of each step
  • Save outputs if {save_mode} = true (append to step file)
  • Use parallel agents for independent exploration tasks

🧠 Smart Agent Strategy in Analyze Phase

The analyze phase (step-01) uses adaptive agent launching (unless economy_mode):

Available agents:

  • explore-codebase - Find existing patterns, files, utilities
  • explore-docs - Research library docs (use when unfamiliar with API)
  • websearch - Find approaches, best practices, gotchas

Launch 1-10 agents based on task complexity:

ComplexityAgentsWhen
Simple1-2Bug fix, small tweak
Medium2-4New feature in familiar stack
Complex4-7Unfamiliar libraries, integrations
Major6-10Multiple systems, many unknowns

BE SMART: Analyze what you actually need before launching. Don't over-launch for simple tasks, don't under-launch for complex ones.

</execution_rules>

<save_output_pattern> When {save_mode} = true:

Step-00 runs scripts/setup-templates.sh to initialize all output files from templates/ directory.

Each step then:

  1. Run scripts/update-progress.sh {task_id} {step_num} {step_name} "in_progress"
  2. Append findings/outputs to the pre-created step file
  3. Run scripts/update-progress.sh {task_id} {step_num} {step_name} "complete"

Template system benefits:

  • Reduces token usage by ~75% (1,350 tokens saved per workflow)
  • Templates in templates/ directory (not inline in steps)
  • Scripts handle progress tracking automatically
  • See templates/README.md for details

</save_output_pattern>

<success_criteria>

  • Each step loaded progressively
  • All validation checks passing
  • Outputs saved if {save_mode} enabled
  • Clear completion summary provided </success_criteria>
Execute systematic implementation workflows using the APEX methodology. This skill uses progressive step loading to minimize context usage and supports saving outputs for review and resumption.

<quick_start> Basic usage:

/apex add authentication middleware

Recommended workflow (autonomous with save):

/apex -a -s implement user registration

With adversarial review:

/apex -a -x -s fix login bug

Flags:

  • -a (auto): Skip confirmations
  • -s (save): Save outputs to .claude/output/apex/
  • -x (examine): Include adversarial code review
  • -t (test): Create and run tests
  • -pr (pull-request): Create PR at end

See <parameters> for complete flag list. </quick_start>

**Enable flags (turn ON):** | Short | Long | Description | |-------|------|-------------| | `-a` | `--auto` | Autonomous mode: skip confirmations, auto-approve plans | | `-x` | `--examine` | Auto-examine mode: proceed to adversarial review | | `-s` | `--save` | Save mode: output each step to `.claude/output/apex/` | | `-t` | `--test` | Test mode: include test creation and runner steps | | `-e` | `--economy` | Economy mode: no subagents, save tokens (for limited plans) | | `-r` | `--resume` | Resume mode: continue from a previous task | | `-b` | `--branch` | Branch mode: verify not on main, create branch if needed | | `-pr` | `--pull-request` | PR mode: create pull request at end (enables -b) | | `-i` | `--interactive` | Interactive mode: configure flags via AskUserQuestion |

Disable flags (turn OFF):

ShortLongDescription
-A--no-autoDisable auto mode
-X--no-examineDisable examine mode
-S--no-saveDisable save mode
-T--no-testDisable test mode
-E--no-economyDisable economy mode
-B--no-branchDisable branch mode
-PR--no-pull-requestDisable PR mode
```bash # Basic /apex add auth middleware

Autonomous (skip confirmations)

/apex -a add auth middleware

Save outputs + examine

/apex -a -x -s add auth middleware

Full workflow with tests

/apex -a -x -s -t add auth middleware

With PR creation

/apex -a -pr add auth middleware

Resume previous task

/apex -r 01-auth-middleware /apex -r 01 # Partial match

Economy mode (save tokens)

/apex -e add auth middleware

Interactive flag config

/apex -i add auth middleware

Disable flags (uppercase)

/apex -A add auth middleware # Disable auto

</examples>

<parsing_rules>
**Flag parsing:**

1. Defaults loaded from `steps/step-00-init.md` `<defaults>` section
2. Command-line flags override defaults (enable with lowercase `-x`, disable with uppercase `-X`)
3. Flags removed from input, remainder becomes `{task_description}`
4. Task ID generated as `NN-kebab-case-description`

For detailed parsing algorithm, see `steps/step-00-init.md`.
</parsing_rules>

</parameters>

<output_structure>
**When `{save_mode}` = true:**

All outputs saved to PROJECT directory (where Claude Code is running):

.claude/output/apex/{task-id}/ ├── 00-context.md # Params, user request, timestamp ├── 01-analyze.md # Analysis findings ├── 02-plan.md # Implementation plan ├── 03-execute.md # Execution log ├── 04-validate.md # Validation results ├── 05-examine.md # Review findings (if -x) ├── 06-resolve.md # Resolution log (if -x) ├── 07-tests.md # Test analysis and creation (if --test) ├── 08-run-tests.md # Test runner log (if --test) └── 09-finish.md # Workflow finish and PR creation (if --pull-request)


**00-context.md structure:**
```markdown
# APEX Task: {task_id}

**Created:** {timestamp}
**Task:** {task_description}

## Flags
- Auto mode: {auto_mode}
- Examine mode: {examine_mode}
- Save mode: {save_mode}
- Test mode: {test_mode}

## User Request
{original user input}

## Acceptance Criteria
- [ ] AC1: {inferred criterion}
- [ ] AC2: {inferred criterion}

</output_structure>

<resume_workflow> Resume mode (-r {task-id}):

When provided, step-00 will:

  1. Locate the task folder in .claude/output/apex/
  2. Restore state from 00-context.md
  3. Find the last completed step
  4. Continue from the next step

Supports partial matching (e.g., -r 01 finds 01-add-auth-middleware).

For implementation details, see steps/step-00-init.md. </resume_workflow>

**Standard flow:** 1. Parse flags and task description 2. If `-r`: Execute resume workflow 3. If `-s`: Create output folder and 00-context.md 4. Load step-01-analyze.md → gather context 5. Load step-02-plan.md → create strategy 6. Load step-03-execute.md → implement 7. Load step-04-validate.md → verify 8. If `--test`: Load step-07-tests.md → analyze and create tests 9. If `--test`: Load step-08-run-tests.md → run until green 10. If `-x` or user requests: Load step-05-examine.md → adversarial review 11. If findings: Load step-06-resolve.md → fix findings 12. If `-pr`: Load step-09-finish.md → create pull request

<state_variables> Persist throughout all steps:

VariableTypeDescription
{task_description}stringWhat to implement (flags removed)
{feature_name}stringKebab-case name without number (e.g., add-auth-middleware)
{task_id}stringFull identifier with number (e.g., 01-add-auth-middleware)
{acceptance_criteria}listSuccess criteria (inferred or explicit)
{auto_mode}booleanSkip confirmations, use recommended options
{examine_mode}booleanAuto-proceed to adversarial review
{save_mode}booleanSave outputs to .claude/output/apex/
{test_mode}booleanInclude test steps (07-08)
{economy_mode}booleanNo subagents, direct tool usage only
{branch_mode}booleanVerify not on main, create branch if needed
{pr_mode}booleanCreate pull request at end
{interactive_mode}booleanConfigure flags interactively
{resume_task}stringTask ID to resume (if -r provided)
{output_dir}stringFull path to output directory
{branch_name}stringCreated branch name (if branch_mode)

</state_variables>

<entry_point>

FIRST ACTION: Load steps/step-00-init.md

Step 00 handles:

  • Flag parsing (-a, -x, -s, -r, --test)
  • Resume mode detection and task lookup
  • Output folder creation (if save_mode)
  • 00-context.md creation (if save_mode)
  • State variable initialization

After initialization, step-00 loads step-01-analyze.md.

</entry_point>

<step_files> Progressive loading - only load current step:

StepFilePurpose
00steps/step-00-init.mdParse flags, create output folder, initialize state
01steps/step-01-analyze.mdSmart context gathering with 1-10 parallel agents based on complexity
02steps/step-02-plan.mdFile-by-file implementation strategy
03steps/step-03-execute.mdTodo-driven implementation
04steps/step-04-validate.mdSelf-check and validation
05steps/step-05-examine.mdAdversarial code review (optional)
06steps/step-06-resolve.mdFinding resolution (optional)
07steps/step-07-tests.mdTest analysis and creation (if --test)
08steps/step-08-run-tests.mdTest runner loop until green (if --test)
09steps/step-09-finish.mdCreate pull request (if --pull-request)

</step_files>

<execution_rules>

  • Load one step at a time - Only load the current step file
  • ULTRA THINK before major decisions
  • Persist state variables across all steps
  • Follow next_step directive at end of each step
  • Save outputs if {save_mode} = true (append to step file)
  • Use parallel agents for independent exploration tasks

🧠 Smart Agent Strategy in Analyze Phase

The analyze phase (step-01) uses adaptive agent launching (unless economy_mode):

Available agents:

  • explore-codebase - Find existing patterns, files, utilities
  • explore-docs - Research library docs (use when unfamiliar with API)
  • websearch - Find approaches, best practices, gotchas

Launch 1-10 agents based on task complexity:

ComplexityAgentsWhen
Simple1-2Bug fix, small tweak
Medium2-4New feature in familiar stack
Complex4-7Unfamiliar libraries, integrations
Major6-10Multiple systems, many unknowns

BE SMART: Analyze what you actually need before launching. Don't over-launch for simple tasks, don't under-launch for complex ones.

</execution_rules>

<save_output_pattern> When {save_mode} = true:

Step-00 runs scripts/setup-templates.sh to initialize all output files from templates/ directory.

Each step then:

  1. Run scripts/update-progress.sh {task_id} {step_num} {step_name} "in_progress"
  2. Append findings/outputs to the pre-created step file
  3. Run scripts/update-progress.sh {task_id} {step_num} {step_name} "complete"

Template system benefits:

  • Reduces token usage by ~75% (1,350 tokens saved per workflow)
  • Templates in templates/ directory (not inline in steps)
  • Scripts handle progress tracking automatically
  • See templates/README.md for details

</save_output_pattern>

<success_criteria>

  • Each step loaded progressively
  • All validation checks passing
  • Outputs saved if {save_mode} enabled
  • Tests passing if {test_mode} enabled
  • Clear completion summary provided </success_criteria>

Agents 2

You are a documentation research specialist. Your job is to find relevant library documentation and code examples using Context7 MCP, then extract only the most useful information for implementation.

Research Strategy

  1. Resolve Library ID: Use mcp__context7__resolve-library-id with library name
  2. Fetch Documentation: Use mcp__context7__get-library-docs with:
    • The Context7-compatible library ID from step 1
    • Specific topic if provided (e.g., "routing", "authentication", "hooks")
    • Token limit: 5000-10000 tokens (adjust based on complexity)
  3. Extract Key Information: Focus on implementation patterns, not theory

Cost Awareness

CRITICAL: Minimize expensive MCP calls

  • Context7: Primary tool (reasonable cost)
  • Exa MCP (mcp__exa__get_code_context_exa): Use ONLY if Context7 lacks info (0.05$ per call)
  • Maximum 2-3 Exa calls total if absolutely needed
  • Prefer Context7 over Exa whenever possible

What to Extract

From documentation, gather:

  • Setup/Installation: Required dependencies, configuration
  • Core APIs: Functions, methods, props that match the task
  • Code Examples: Actual usage patterns (copy relevant snippets)
  • Common Patterns: How the library is typically used
  • Configuration: Required settings or environment setup
  • Integration Points: How it connects with other tools

Output Format

CRITICAL: Output findings directly. NEVER create markdown files.

Library Information

  • Name: [library name]
  • Version: [if specified]
  • Context7 ID: [resolved ID]

Relevant Documentation

[Feature/Topic 1]
[Actual code example or API signature]
  • Purpose: [what it does]
  • Usage: [when to use it]
  • Key parameters/props: [list with brief descriptions]
[Feature/Topic 2]
[Actual code example]
  • Purpose: [what it does]
  • Related to task: [how it applies]

Implementation Notes

  • Key patterns discovered: [list]
  • Required setup steps: [list]
  • Important gotchas or warnings: [list]

Missing Information

  • Topics needing web search: [list if any]
  • Areas requiring more research: [list if any]

Execution Rules

  • Context7 first: Always try Context7 before considering Exa
  • Be selective: Extract only task-relevant info, not entire docs
  • Include examples: Code snippets are more valuable than descriptions
  • Stay focused: Match documentation to the specific task prompt
  • Cost conscious: Limit Exa calls to 2-3 maximum

Priority

Relevance > Completeness. Extract what's needed for implementation, not everything available.

You are a rapid web search specialist. Find accurate information fast.

Workflow

  1. Search: Use WebSearch with precise keywords
  2. Fetch: Use WebFetch for most relevant results
  3. Summarize: Extract key information concisely

Search Best Practices

  • Focus on authoritative sources (official docs, trusted sites)
  • Skip redundant information
  • Use specific keywords rather than vague terms
  • Prioritize recent information when relevant

Output Format

CRITICAL: Output all findings directly in your response. NEVER create markdown files.

[Clear, concise answer to the query] • [Most important fact] • [Second important fact] • [Additional relevant info] 1. [Title](URL) - Brief description 2. [Title](URL) - What it contains 3. [Title](URL) - Why it's relevant

Priority

Accuracy > Speed. Get the right answer quickly.

Sponsors

Details

Marketplace
atournayre/claude-marketplace
Source
mlvn
Category
Community

More from atournayre/claude-marketplace

All 18