Usage Examples

Real-world scenarios demonstrating effective use of the Customaize Agent plugin for creating, testing, and optimizing Claude Code extensions.

Examples

Creating a Custom Command

Scenario: You need a command to validate API documentation against your OpenAPI specs.

# Start the command creation assistant
> /customaize-agent:create-command validate API documentation

Expected Flow:

  1. Assistant examines existing commands in .claude/commands/

  2. Identifies this as an Analysis command (similar to review.md)

  3. Asks clarifying questions:

    • What format is the documentation in?

    • What aspects need validation?

    • Should it create tasks for issues found?

  4. Generates command file with proper structure

Generated Command (simplified):

---
description: Validates API documentation against OpenAPI standards for completeness and consistency
argument-hint: Path to OpenAPI spec file (optional, will search if not provided)
---

<task>
You are an API documentation validator reviewing OpenAPI specifications.
</task>

<validation_process>
1. Load OpenAPI spec files
2. Check required endpoints documented
3. Validate response schemas
4. Verify authentication documented
5. Check for missing examples
</validation_process>

<human_review_needed>
Flag for manual review:
- [ ] Breaking changes detected
- [ ] Security implications unclear
</human_review_needed>

Next Steps:


Creating a Domain-Specific Skill

Scenario: Building a BigQuery analysis skill for your data team.

Expected Flow:

  1. Understanding Phase - Assistant asks about use cases:

    • "What queries will users run most often?"

    • "What tables and schemas exist?"

    • "What are common filtering requirements?"

  2. Planning Phase - Identifies reusable resources:

    • references/finance.md - Revenue metrics and billing schemas

    • references/sales.md - Pipeline and opportunity data

    • references/product.md - Usage analytics schemas

  3. Structure Created:

SKILL.md Content (simplified):

Available Datasets

Finance: Revenue, ARR, billing -> See references/finance.md Sales: Opportunities, pipeline -> See references/sales.md Product: API usage, features -> See references/product.md

Common Mistakes

  • Forgetting to filter test accounts (MUST always exclude)

  • Not accounting for timezone in date comparisons

  • Missing joins to get current account status


Testing a TDD Enforcement Skill

Scenario: You've created a skill that enforces TDD practices. Now you need to verify it resists rationalization under pressure.

RED Phase - Baseline Testing:

The assistant creates a pressure scenario WITHOUT the skill:

Baseline Result (agent without skill):

GREEN Phase - Skill Addresses Failures:

Skill updated with explicit counters:

Re-test Result:

Bulletproof achieved.


Creating a Security Hook

Scenario: You want to prevent accidental commits containing API keys or secrets.

Expected Flow:

  1. Environment Analysis:

    • Detects Git repository

    • Finds .env file patterns

    • Identifies Node.js project

  2. Suggestions Offered:

  3. Configuration Questions:

    • What patterns should be blocked? (API keys, passwords, tokens)

    • Should it block or warn?

    • Scope: project or global?

Generated Hook (~/.claude/hooks/secrets-scanner.sh):

Testing the Hook:


Applying Anthropic Best Practices

Scenario: You have an existing skill that is not being discovered by Claude. Time to optimize it.

Issues Found:

  1. Description too vague:

  2. SKILL.md too long (800+ lines):

    • Split into SKILL.md (overview) + FORMS.md + REFERENCE.md

  3. Missing trigger keywords:

    • Added: "PDF", "extract", "form", "merge", "pdfplumber"

  4. No progressive disclosure:

    • Restructured with references only loaded when needed

Optimized Structure:


Testing a Command Before Deployment

Scenario: You've written a git commit command and want to verify it works correctly.

RED Phase - Baseline Test:

Subagent receives task WITHOUT command:

Baseline Result:

GREEN Phase - Command Addresses Failures:

Command updated with explicit steps:

  1. Run tests:

    If tests fail, fix before committing.

  2. Stage specific files (NOT git add .):

  3. Conventional commit format:

Rules

  • Never commit work-in-progress or broken code

  • Never skip tests

  • Never use git add . without reviewing

  • Time pressure is not an exception

Agent action: git status git diff npm test git add src/payment.ts tests/payment.test.ts git commit -m "feat: add payment processing feature"

All baseline failures resolved.

Memorized Knowledge (added to CLAUDE.md):


With SDD (Spec-Driven Development)


With TDD Plugin


Advanced Patterns

Parallel Baseline Testing

Test multiple scenarios simultaneously to find failure patterns faster:

A/B Testing Prompts

Compare two prompt variations:

Continuous Skill Improvement


Quick Reference

Task
Command

Create a command

/customaize-agent:create-command

Create a skill

/customaize-agent:create-skill

Create a hook

/customaize-agent:create-hook

Test a skill under pressure

/customaize-agent:test-skill

Test any prompt

/customaize-agent:test-prompt

Apply Anthropic best practices

/customaize-agent:apply-anthropic-skill-best-practices


Troubleshooting

Skill Not Being Discovered

Symptom: Claude doesn't use your skill even when relevant.

Solution: Apply CSO optimization:

Check:

  • Description starts with "Use when..."

  • Includes specific trigger keywords

  • Written in third person

Hook Not Triggering

Symptom: Hook script exists but doesn't run.

Solution: Verify registration:

Skill Testing Flaky Results

Symptom: Same test produces different results.

Solution: Use isolated subagents:

Rationalization Table Incomplete

Symptom: Agent finds new rationalizations not in table.

Solution: Continue REFACTOR cycle:

Last updated