Skip to content

■ SKILLS // SKILL SPECS

context-engineering

Comprehensive toolkit for creating production-ready Claude Code resources: agents, skills, plugins, commands, hooks, and patterns. Expert guidance with templates, examples, and best practices following Anthropic specifications.

■ [!] ON THIS PAGE ▼
■ INSTALL // npx @self.md/cli install context-engineering
AuthorAndis A. Blukis
Namespace@andisab/swe-marketplace
Category#development
Version1.0.0
Stars★ 3
Downloads↓ 4
Verification[ ✓ ] self.md verified

Comprehensive toolkit for creating production-ready Claude Code resources: agents, skills, plugins, commands, hooks, and patterns. Expert guidance with templates, examples, and best practices following Anthropic specifications.

Installation

npx claude-plugins install @andisab/swe-marketplace/context-engineering

Contents

Folders: agents, patterns, skills, templates

Files: README.md

Documentation

🎯 Expert toolkit for creating production-ready Claude Code resources

A comprehensive Claude Code plugin that helps you design and implement high-quality agents, skills, plugins, commands, hooks, and other Claude SDK components following Anthropic’s official specifications and best practices.

Features

🤖 Expert Agent

context-engineer - Your context engineering specialist that:

  • Designs sub-agents with discovery-optimized descriptions
  • Creates autonomous skills with proper activation triggers
  • Structures complete plugins with proper distribution
  • Crafts slash commands with argument handling
  • Configures lifecycle hooks for automation
  • Uses conventions-mcp to find proven patterns
  • Implements progressive disclosure for token efficiency

🎓 Five Specialized Skills

Auto-activated skills provide detailed guidance for each resource type:

  1. agent-definition-creation - Creating sub-agents with proper YAML frontmatter, system prompts, tool access, and example-driven descriptions
  2. skill-creation - Designing model-invoked capabilities with discovery optimization and supporting file structures
  3. plugin-development - Building plugin bundles with proper directory structure, metadata, and distribution
  4. command-creation - Crafting slash commands with arguments, file references, and bash execution
  5. hook-configuration - Setting up lifecycle event handlers for automation and workflow control

📋 Complete Templates

Ready-to-use starting points for every resource type:

  • subagent-template.md - Agent structure with frontmatter and system prompt
  • skill-template.md - Skill structure with activation triggers and supporting files
  • plugin-structure.md - Complete plugin directory layout and configuration
  • slash-command-template.md - Command patterns with 10 real-world examples
  • hook-configuration-template.md - 20+ hook configurations for common scenarios

🎨 Best Practice Patterns

Documentation of proven architectural patterns:

  • progressive-disclosure.md - Token management with three disclosure levels (saves 80%+ tokens)
  • multi-agent-orchestration.md - Coordinating multiple agents for complex workflows
  • tool-restriction-patterns.md - Security-focused tool access control

Installation

Quick Install

/plugin install context-engineering@swe-marketplace

For Team Projects

Add to .claude/settings.json:

{
  "plugins": {
    "context-engineering": {
      "source": "context-engineering@swe-marketplace",
      "enabled": true
    }
  }
}

Usage

Creating a Sub-Agent

Simply ask Claude:

User: "Create an agent for PostgreSQL database optimization"

Claude: I'll use the context-engineer agent to design a comprehensive
        PostgreSQL expert with query optimization, schema design, and performance
        tuning capabilities.

The agent will:

  1. Ask clarifying questions about domain and capabilities
  2. Search conventions-mcp for similar agents
  3. Use the agent-definition-creation skill automatically
  4. Create proper YAML frontmatter and system prompt
  5. Include discovery-optimized examples
  6. Select appropriate tools and model

Creating a Skill

User: "I want Claude to automatically process PDF files when I mention them"

Claude: I'll create a skill that activates when you mention PDF processing...

The skill-creation skill automatically activates to:

  1. Design activation triggers and keywords
  2. Structure supporting files (examples/, templates/, references/)
  3. Write clear usage instructions
  4. Implement progressive disclosure

Creating a Plugin

User: "Help me create a plugin for our deployment workflow with agents, commands, and hooks"

Claude: I'll design a deployment plugin with proper structure...

The plugin-development skill handles:

  1. Directory organization
  2. plugin.json configuration
  3. Component coordination
  4. Distribution strategy
  5. README and documentation

Creating a Slash Command

User: "Make a command that runs tests with different environments"

Claude: I'll create a /run-tests command with environment arguments...

The command-creation skill creates:

  1. Argument handling ($1, $2, defaults)
  2. File references (@file)
  3. Bash execution (!command)
  4. Tool permissions
  5. Help documentation

Creating Hooks

User: "Automatically format Python files after I edit them"

Claude: I'll configure a PostToolUse hook that runs Black and isort...

The hook-configuration skill sets up:

  1. Event selection (PreToolUse, PostToolUse, etc.)
  2. Matchers (tool, file patterns)
  3. Shell commands
  4. Security validation

Components

Agent

  • context-engineer - Main orchestrator for all resource creation
    • Model: opus (complex reasoning for design decisions)
    • Tools: Read, Write, Edit, Grep, Glob, Bash, MCP (conventions search)
    • Proactive usage for any resource creation request

Skills

| Skill | Activation Triggers | Pur

Included Skills

This plugin includes 5 skill definitions:

agent-definition-creation

View skill definition

Agent Definition Creation Skill

This skill helps create production-ready Claude Code sub-agent definitions following Anthropic’s official specifications and best practices.

Core Principles

1. Single Responsibility

Each agent should have ONE clear purpose. Avoid creating multipurpose agents that try to do everything.

Good: postgres-expert - PostgreSQL database management and optimization Bad: database-expert - All databases (too broad)

2. Discovery-Optimized Descriptions

The description field is critical for Claude to discover when to use your agent. Include:

  • What: Clear statement of capabilities
  • When: Specific scenarios that trigger usage
  • Examples: Concrete usage patterns with user/assistant dialogue
  • Trigger terms: Keywords users might mention

3. Tool Restriction Strategy

Grant only necessary tools following principle of least privilege:

  • Omit tools field: Inherits all tools from main conversation (use for general-purpose agents)
  • Specify tools list: Grant specific tools (use for focused/security-sensitive agents)

4. Model Selection

Choose the right model for the task:

  • sonnet: Default choice for most agents (balanced performance/cost)
  • opus: Complex reasoning, architecture decisions, critical tasks
  • haiku: Simple, repetitive tasks with clear patterns
  • inherit: Match parent conversation’s model

Agent Structure

---
name: agent-identifier
description: >
  Prima  

...(truncated)

</details>

### command-creation

> >

<details>
<summary>View skill definition</summary>

# Command Creation Skill

This skill helps create production-ready custom slash commands following Anthropic's official specifications.

## What is a Slash Command?

A **slash command** is a user-invoked reusable prompt stored as a Markdown file. Unlike skills (model-invoked) or agents (complex AI assistants), slash commands are:

- **User-triggered**: Explicitly invoked with `/command-name`
- **Template-based**: Expand to prompts with placeholders
- **Lightweight**: Simple Markdown files with optional frontmatter
- **Quick access**: Fast way to reuse common instructions

## Commands vs Skills vs Agents

| Feature | Command | Skill | Agent |
|---------|---------|-------|-------|
| **Invocation** | User (`/name`) | Model (automatic) | User or Task tool |
| **Complexity** | Simple prompt template | Capability with logic | Full AI assistant |
| **Arguments** | Yes ($1, $2, $ARGUMENTS) | N/A | N/A |
| **File access** | Yes (@file) | Via tools | Via tools |
| **Bash exec** | Yes (!command) | Via tools | Via tools |
| **Use case** | Quick prompts, workflows | Autonomous features | Domain expertise |

**When to use Commands**: Reusable prompts, quick text expansion, parametrized instructions, file processing workflows

## Command Structure

### Basic Command (Prompt only)

```markdown
Please review this code for security vulnerabilities and provide
specific recommendations for improvement.

File: .claude/commands/security-review.md Usage: /security-review

Command with F

hook-configuration

View skill definition

Hook Configuration Skill

This skill helps create production-ready Claude Code hooks following Anthropic’s official specifications.

What are Hooks?

Hooks are user-defined shell commands that execute at various points in Claude Code’s lifecycle. They provide:

  • Deterministic control: Ensure actions happen automatically, not relying on LLM decisions
  • Workflow automation: Format code, run linters, log commands
  • Custom notifications: Alert when Claude needs input
  • Permission systems: Block sensitive file modifications
  • Feedback loops: Validate code changes against conventions

Hook vs Skill vs Command

FeatureHookSkillCommand
TriggerLifecycle eventContext matchUser invocation
TypeShell commandAI capabilityPrompt template
Use caseAutomation, validationAutonomous featuresReusable prompts
ControlDeterministicLLM-drivenUser-initiated

When to use Hooks: Automatic formatting, logging, notifications, permission control, code validation

Hook Events

Ten lifecycle events trigger hooks:

1. PreToolUse

Executes after Claude creates tool parameters but before processing.

Use cases:

  • Block edits to sensitive files (.env, production configs)
  • Validate bash commands before execution
  • Request confirmation for destructive operations
  • Log all tool usage for auditing
  • Modify tool inputs programmatically

**Blocking ca

plugin-development

View skill definition

Plugin Development Skill

This skill helps create production-ready Claude Code plugins following Anthropic’s official plugin specifications.

What is a Plugin?

A plugin is a bundled collection of Claude Code components that work together to provide cohesive functionality. Plugins enable:

  • Modular distribution: Package related capabilities together
  • Team sharing: Install once across multiple projects
  • Version management: Track plugin versions independently
  • Marketplace discovery: Publish for community use
  • Automatic updates: Keep components synchronized

Plugin vs Individual Components

ApproachWhen to Use
Individual ComponentsSingle capability, personal use, experimental
PluginMultiple related components, team distribution, reusable across projects

Example - Individual approach:

  • .claude/agents/postgres-expert.md (one file)
  • .claude/commands/test.md (one file)

Example - Plugin approach:

  • database-toolkit/ plugin containing:
    • Agents: postgres-expert, mongodb-expert, sql-expert
    • Skills: migration-management, query-optimization
    • Commands: /migrate, /db-status
    • Templates: schema templates

Plugin Structure

plugin-name/
├── .claude-plugin/
│   └── plugin.json              # Required: Plugin metadata
├── agents/                      # Optional: Sub-agent definitions
│   ├── agent-one.md
│   └── agent-two.md
├── skills/                      # Optional

...(truncated)

</details>

### skill-creation

> >

<details>
<summary>View skill definition</summary>

# Skill Creation Skill

This skill helps create production-ready Claude Code skills following Anthropic's official specifications and best practices.

## Skills vs Agents: Key Differences

| Aspect | Skills | Sub-agents |
|--------|--------|------------|
| **Invocation** | Model-invoked (automatic) | User-invoked (explicit) or Task tool |
| **Scope** | Single capability | Multiple capabilities |
| **File** | Directory with SKILL.md | Single .md file |
| **Supporting files** | Can include templates, scripts | System prompt only |
| **Discovery** | Description matching | Description + explicit invocation |
| **Use case** | Reusable patterns, tools, workflows | Specialized AI assistants |

**When to use Skills**: Create autonomous capabilities that Claude should invoke automatically when context matches (e.g., PDF processing, form filling, specific workflows)

**When to use Agents**: Create specialized AI assistants for complex domains requiring multi-step reasoning (e.g., database expert, security auditor)

## Skill Structure

skill-name/ ├── SKILL.md # Required: Skill definition and content ├── examples/ # Optional: Example usage │ ├── basic-usage.md │ └── advanced-patterns.md ├── templates/ # Optional: Code templates │ └── template-file.py ├── references/ # Optional: Reference materials │ └── api-docs.md └── scripts/ # Optional: Helper scripts └── helper.py


## SKILL.m



</details>

## Source

[View on GitHub](https://github.com/andisab/swe-marketplace)