development-assistant
Guides through adding new features, MCP tools, analyzers, and extending the patent creator system.
What this skill does
# Development Assistant Skill
Expert system for developing and extending the Claude Patent Creator. Guides through adding new MCP tools, analyzers, configuration options, and features while following best practices and existing patterns.
## When to Use This Skill
Activate when adding MCP tools, analyzers, configuration options, BigQuery queries, slash commands, or implementing performance optimizations.
## Development Workflow
```
Feature Request -> Planning -> Implementation (Code + Validation + Monitoring + Tests) -> Testing -> Documentation -> Integration
```
## Adding New MCP Tools
**Quick Start:**
1. Define inputs, outputs, dependencies
2. Create Pydantic model in `mcp_server/validation.py`
3. Add tool function in `mcp_server/server.py` with decorators
4. Create test script in `scripts/`
5. Update CLAUDE.md
**Key Decorators:**
```python
@mcp.tool() # Register as MCP tool
@validate_input(YourInput) # Pydantic validation
@track_performance # Performance monitoring
```
**Template:**
```python
def your_tool(param: str, optional: int = 10) -> dict:
"""Comprehensive docstring (Claude sees this).
Args:
param: Description
optional: Description with default
Returns:
Dictionary containing: key1, key2, key3
"""
# Implementation
return {"result": "data"}
```
## Adding New Analyzers
**Overview:** Analyzers inherit from `BaseAnalyzer` and check USPTO compliance.
**Minimal Example:**
```python
from mcp_server.analyzer_base import BaseAnalyzer
class YourAnalyzer(BaseAnalyzer):
def __init__(self):
super().__init__()
self.mpep_sections = ["608", "2173"]
def analyze(self, content: str) -> dict:
issues = []
if violation:
issues.append({
"type": "violation_name",
"severity": "critical",
"mpep_citation": "MPEP 608",
"recommendation": "Fix description"
})
return {"compliant": len(issues) == 0, "issues": issues}
```
## Adding Configuration Options
Use Pydantic settings in `mcp_server/config.py`:
```python
# In config.py
class AppSettings(BaseSettings):
enable_feature_x: bool = Field(default=False, description="Enable X")
# In your code
from mcp_server.config import get_settings
if get_settings().enable_feature_x:
# Feature enabled
```
## Adding Performance Monitoring
```python
@track_performance
def your_function(data):
with OperationTimer("step1"):
result1 = step1(data)
with OperationTimer("step2"):
result2 = step2(result1)
return result2
```
## Modifying RAG Search Pipeline
Pipeline: `Query -> HyDE -> Vector+BM25 -> RRF -> Reranking -> Results`
**Customization Points:** Query expansion, custom scoring, filtering, reranking strategies
## Adding New Slash Commands
1. Create `.claude/commands/your-command.md`
2. Add frontmatter: `description`, `model`
3. Write workflow instructions
4. Restart Claude Code
**Template:**
```markdown
---
description: Brief command description
model: claude-sonnet-4-5-20250929
---
# Command Name
## When to Use
- Use case 1
## How It Works
Step 1: ...
```
## Development Best Practices
1. Follow existing patterns
2. Use type hints
3. Write docstrings (Google style)
4. Handle errors gracefully
5. Validate inputs (Pydantic)
6. Log operations
7. Monitor performance
## Common Development Tasks
**Add BigQuery Query:** Add method in `mcp_server/bigquery_search.py`
**Add Validation Rule:**
```python
class YourInput(BaseModel):
field: str
@field_validator("field")
@classmethod
def validate_field(cls, v):
if not meets_requirement(v):
raise ValueError("Error message")
return v
```
**Add Logging:**
```python
from mcp_server.logging_config import get_logger
logger = get_logger()
logger.info("event_name", extra={"context": "data"})
```
## Quick Reference: File Locations
| Task | Primary File | Related Files |
|------|-------------|---------------|
| Add MCP tool | `mcp_server/server.py` | `mcp_server/validation.py` |
| Add analyzer | `mcp_server/your_analyzer.py` | `mcp_server/analyzer_base.py` |
| Add config | `mcp_server/config.py` | `.env`, `CLAUDE.md` |
| Add BigQuery query | `mcp_server/bigquery_search.py` | - |
| Add test | `scripts/test_your_feature.py` | - |
## Key Patterns
**MCP Tool Pattern:**
```python
@mcp.tool()
@validate_input(InputModel)
@track_performance
def tool_name(param: type) -> dict:
"""Docstring visible to Claude."""
from module import Component
if invalid:
return {"error": "message"}
result = process(param)
return {"key": "value"}
```
**Analyzer Pattern:**
```python
class YourAnalyzer(BaseAnalyzer):
def analyze(self, content: str) -> dict:
issues = []
issues.extend(self._check_x(content))
return {
"compliant": len(issues) == 0,
"issues": issues,
"recommendations": self._generate_recommendations(issues)
}
```
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.