Analyze and optimize database schemas, identify performance issues, and suggest improvements. Use when working with database structure, indexes, or query performance.
This is a reference implementation of an AI agent skill package for the Composer AI Agent Skill Plugin.
Note: this example uses
type: ai-agent-skill— the dedicated skill package pattern. Since v0.2.0, any package can ship a skill alongside its primary purpose by addingextra.ai-agent-skillto itscomposer.json, regardless oftype. See the plugin's README "Creating Skill Packages" for both patterns. Use this dedicated pattern when the package's only purpose is shipping skills; use the library-bundled pattern when adding a skill to an existing library.
database-analyzer-skill/
├── composer.json # Package metadata with type: ai-agent-skill
├── SKILL.md # Skill definition following Claude Code schema
├── README.md # This file
├── src/ # Optional: PHP helper classes
├── references/ # Optional: Reference files (SQL patterns, examples)
├── scripts/ # Optional: Utility scripts
└── assets/ # Optional: Additional resources
The most important part is setting the package type:
{
"name": "example/database-analyzer-skill",
"type": "ai-agent-skill", ← This makes it discoverable
"description": "AI agent skill for database schema analysis"
}
Must follow the Claude Code SKILL.md specification:
Required Frontmatter:
---
name: database-analyzer # lowercase, numbers, hyphens (max 64 chars)
description: What it does and when to use it (max 1024 chars)
---
Content Structure:
type: ai-agent-skill (or extra.ai-agent-skill) during install/update
2a. Trust prompt: First time a new package's skills appear, the plugin asks the user to allow or deny — see the main README for detailscomposer read-skill database-analyzermkdir my-skill
cd my-skill
git init
# Copy this example as a template
cp -r examples/database-analyzer-skill/* .
# Customize for your skill
vim composer.json # Update name, description, authors
vim SKILL.md # Write your skill instructions
# Create a test project
mkdir ../test-project
cd ../test-project
composer init
# Add your skill as a local path repository
composer config repositories.my-skill path ../my-skill
composer require vendor/my-skill
# Verify registration
composer list-skills
composer read-skill my-skill
# Tag a release
git tag 1.0.0
git push origin main --tags
# Submit to https://packagist.org
No configuration needed if SKILL.md is in package root:
my-skill/
├── composer.json
├── SKILL.md ← Auto-discovered
└── src/
For skill in non-root location:
{
"type": "ai-agent-skill",
"extra": {
"ai-agent-skill": "docs/my-skill.md"
}
}
For packages with multiple skills:
{
"type": "ai-agent-skill",
"extra": {
"ai-agent-skill": [
"skills/analyzer.md",
"skills/optimizer.md",
"skills/validator.md"
]
}
}
^[a-z0-9-]{1,64}$database-analyzer, symfony-security, api-validatorFor Claude Code integration:
---
name: my-skill
description: What it does
allowed-tools: [Read, Grep, Glob, Bash] # Restrict tools
---
Skills can include additional files:
my-skill/
├── SKILL.md
├── references/
│ ├── sql-patterns.sql
│ └── examples.md
├── scripts/
│ ├── analyze.php
│ └── validate.sh
└── assets/
└── checklist.md
Reference in SKILL.md:
## Resources
See bundled files:
- `references/sql-patterns.sql` - Common SQL patterns
- `scripts/analyze.php` - Analysis automation script
Use the base directory from `composer read-skill` output to locate files.
Agent Usage:
$ composer read-skill my-skill
Base Directory: vendor/vendor/my-skill
# Agent can now access: vendor/vendor/my-skill/references/sql-patterns.sql
Test your SKILL.md:
# Install the plugin in a test project
composer require netresearch/composer-agent-skill-plugin
# Install your skill
composer require vendor/my-skill
# Check if it appears
composer list-skills
# Read full content
composer read-skill my-skill
Common Issues:
type: ai-agent-skill (or extra.ai-agent-skill) in composer.json. If the package shows in composer list-skills as [pending] or [denied], run composer skills:trust <package> to allow it.✅ Do:
❌ Don't:
For questions about creating skills:
MIT License - feel free to use this as a template for your own skills.
npx skills add netresearch/database-analyzer下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer