ai-agent-skills 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Vlad-Alexandru Nicolescu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,188 @@
1
+ # create-expert-skill
2
+
3
+ > Transform expert conversations into production-grade Claude Skills. Whith this enhanced "skill-creator" skill you can capture domain knowledge and system-specific ontologies through structured roleplay. It also packages deterministic scripts alongside flexible guidance, and loads expertise progressively, turning AI assistants into specialists.
4
+
5
+ ## Why This Exists
6
+
7
+ Anthropic released a basic "skill-creator", however, it doesn't utilize the entire range of what's possible within a Skill. This enhanced skill creator makes use of resources, examples, templates, scripts, progressive disclosure and system architecture knowledge to deliver elaborate skills, zipped and ready to upload.
8
+
9
+ ## Why the "Expert" Part Matters
10
+
11
+ AI assistants struggle in production for two reasons:
12
+
13
+ 1. **Missing domain expertise** — Generic models don't know or aren't primed with your industry's edge cases, terminology, or unwritten rules.
14
+ 2. **Missing ontology understanding** — They don't grasp your specific data structures, entity relationships, or system constraints
15
+
16
+ This skill solves both by helping you:
17
+ - **Interview experts** (or yourself) to extract implicit domain knowledge
18
+ - **Map system ontologies** — company-specific structures, codes, and relationships
19
+ - **Separate deterministic work** (validation, parsing, math) from flexible interpretation
20
+ - **Load knowledge progressively** — only what's needed, when it's needed
21
+
22
+ The result: Claude works like a trained specialist who understands both the domain AND your specific systems.
23
+
24
+ ## Installation
25
+
26
+ ### Claude Desktop (Recommended)
27
+
28
+ The packaged `.zip` file is included in this repository for easy installation:
29
+
30
+ 1. Download `create-expert-skill-v2.2.zip` from this repository
31
+ 2. Open Claude Desktop → **Settings** → **Capabilities**
32
+ 3. Under Skills, click **Upload Skill**
33
+ 4. Drag and drop the `.zip` file (no need to unzip)
34
+
35
+ ### Claude Code
36
+
37
+ Skills can be installed at user or project level:
38
+
39
+ **Personal skills** (available in all projects):
40
+ ```bash
41
+ # Unzip and copy to your personal skills directory
42
+ unzip create-expert-skill-v2.2.zip -d ~/.claude/skills/
43
+ ```
44
+
45
+ **Project skills** (shared with team via git):
46
+ ```bash
47
+ # Unzip into your project's .claude/skills/ directory
48
+ unzip create-expert-skill-v2.2.zip -d ./.claude/skills/
49
+ git add .claude/skills/create-expert-skill
50
+ git commit -m "Add create-expert-skill"
51
+ ```
52
+
53
+ Claude Code automatically discovers skills in these locations.
54
+
55
+ ### Claude Agent SDK
56
+
57
+ For programmatic usage with the Agent SDK:
58
+
59
+ 1. Create skills directory in your project: `.claude/skills/`
60
+ 2. Unzip the skill into that directory
61
+ 3. Enable skills in your configuration by adding `"Skill"` to `allowed_tools`
62
+
63
+ ```python
64
+ from claude_agent_sdk import query, ClaudeAgentOptions
65
+
66
+ options = ClaudeAgentOptions(
67
+ allowed_tools=["Skill", "Read", "Write", "Bash"],
68
+ # Skills are auto-discovered from .claude/skills/
69
+ )
70
+ ```
71
+
72
+ See [Agent Skills in the SDK](https://platform.claude.com/docs/en/agent-sdk/skills) for full documentation.
73
+
74
+ ## Usage
75
+
76
+ Start a conversation:
77
+ > "I want to create a skill for validating LEDES billing files"
78
+
79
+ Claude guides you through:
80
+ ```
81
+ Assess → Is this worth creating? (3+ uses, consistent procedure)
82
+ Discover → What's the domain expertise? What are the system ontologies?
83
+ Design → What needs scripts vs guidance vs reference material?
84
+ Create → Generate the skill
85
+ Refine → Iterate until complete
86
+ Ship → Package for deployment
87
+ ```
88
+
89
+ ## How It Works
90
+
91
+ ### Two Knowledge Streams
92
+
93
+ Production-ready skills require BOTH:
94
+
95
+ **Domain Expertise** — Industry knowledge that applies universally:
96
+ - Standards and their versions (e.g., LEDES 98B vs XML 2.0)
97
+ - Professional conventions and edge cases
98
+ - Validation rules from specifications
99
+
100
+ **Ontology Understanding** — System-specific structures:
101
+ - Company policies and constraints
102
+ - Entity relationships (timekeepers → IDs → rates)
103
+ - Data format variations unique to your systems
104
+
105
+ ### Progressive Disclosure Architecture
106
+
107
+ Skills load knowledge in layers, not all at once:
108
+
109
+ ```
110
+ Layer 0 (~25 tokens) → Description only, always visible
111
+ Layer 1 (~500 tokens) → Core procedures in SKILL.md, loaded when triggered
112
+ Layer 2 (~1000+ tokens) → Deep reference in resources/, loaded selectively
113
+ ```
114
+
115
+ **Why this matters:** A 2,000-token skill that loads everything wastes context. A layered skill loads 25 tokens until needed, then 500, then more only if required.
116
+
117
+ ### Deterministic Scripts
118
+
119
+ Anything that can be computed exactly should be:
120
+
121
+ | Task | Without Script | With Script |
122
+ |------|---------------|-------------|
123
+ | Validate date format | LLM guesses (sometimes wrong) | `python validate.py` (always right) |
124
+ | Sum line items | LLM approximates | Script calculates exactly |
125
+ | Check against schema | LLM interprets | Script returns pass/fail |
126
+
127
+ Scripts run at **zero token cost** — Claude executes them and uses the output.
128
+
129
+ ### Skill Structure
130
+
131
+ ```
132
+ my-skill/
133
+ ├── SKILL.md # Layer 1: Core procedures (300-500 tokens)
134
+ ├── scripts/ # Layer 0: Deterministic automation
135
+ │ └── validate.py
136
+ └── resources/ # Layer 2: Deep reference (loaded selectively)
137
+ ├── schemas/
138
+ └── ADVANCED.md
139
+ ```
140
+
141
+ ## Token Optimization
142
+
143
+ | Technique | Before | After | Savings |
144
+ |-----------|--------|-------|---------|
145
+ | Scripts | 500 tokens explaining logic | `python scripts/validate.py` | ~450 |
146
+ | Reference files | Inline schema (200 tokens) | Link to file | ~185 |
147
+ | Layer 2 split | Everything in SKILL.md | Split to resources/ | ~750 |
148
+
149
+ ## Packaging
150
+
151
+ **This skill includes an automated zipping procedure** In most cases, it runs on its own once the expert skill is finished, returning the plug-and-play .zip of the skill directly in conversation. If this doesn't run automatically, simply ask Claude to deliver the packaged skill.
152
+
153
+ ## Files
154
+
155
+ ```
156
+ create-expert-skill/
157
+ ├── SKILL.md # Main skill (Layer 1)
158
+ ├── README.md # This file
159
+ ├── LICENSE # MIT
160
+ ├── create-expert-skill-v2.2.zip # Ready-to-install package
161
+ ├── scripts/
162
+ │ ├── package_skill.py # Packaging automation
163
+ │ └── README.md
164
+ └── resources/
165
+ ├── templates/
166
+ │ └── TEMPLATES.md # Skill templates (minimal/enhanced/script)
167
+ └── examples/
168
+ └── EXAMPLES.md # Domain patterns (billing, API, schemas)
169
+ ```
170
+
171
+ ## Contributing
172
+
173
+ Found a bug or want to improve the skill?
174
+ - Open an issue for bugs or feature requests
175
+ - PRs welcome for templates, examples, or documentation
176
+
177
+ ## License
178
+
179
+ MIT — use freely, modify as needed.
180
+
181
+ ## Author
182
+
183
+ [Vlad-Alexandru Nicolescu](https://github.com/vnicolescu)
184
+
185
+ ---
186
+
187
+ **Version:** 2.2
188
+ **Tested with:** Claude Desktop
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: create-expert-skill
3
+ description: Create production-ready skills from expert knowledge. Extracts domain expertise and system ontologies, uses scripts for deterministic work, loads knowledge progressively. Use when building skills that must work reliably in production.
4
+ version: 2.2
5
+ ---
6
+
7
+ # Expert Skill Creation
8
+
9
+ Transform expert knowledge into production-ready skills that combine domain expertise with system-specific understanding.
10
+
11
+ ## Why Skills Fail in Production
12
+
13
+ AI assistants fail not because they lack intelligence, but because they lack:
14
+
15
+ 1. **Domain Expertise** — Industry-specific rules, edge cases, unwritten conventions
16
+ 2. **Ontology Understanding** — How YOUR systems, data structures, and workflows actually work
17
+
18
+ **Both are required.** Domain knowledge without system context produces generic output. System knowledge without domain expertise produces structurally correct but semantically wrong results.
19
+
20
+ ## Workflow
21
+
22
+ ```
23
+ Assess → Discover (Expertise + Ontology) → Design → Create → Refine → Ship
24
+ ```
25
+
26
+ ## Quick Assessment
27
+
28
+ **Create a skill when:**
29
+ - Used 3+ times (or will be)
30
+ - Follows consistent procedure
31
+ - Saves >300 tokens per use
32
+ - Requires specialized knowledge not in Claude's training
33
+ - Must produce trusted output (not "close enough")
34
+
35
+ **Don't create for:** one-time tasks, basic knowledge Claude already has, rapidly changing content.
36
+
37
+ ## Discovery: Two Streams
38
+
39
+ ### Stream 1: Domain Expertise
40
+
41
+ Deep knowledge that transcends any specific company:
42
+ - Industry standards and their versions
43
+ - Professional conventions and best practices
44
+ - Edge cases only practitioners know
45
+ - Validation rules from specifications
46
+
47
+ *Example (LEDES validation):* LEDES 98B vs XML 2.0 formats, UTBMS code taxonomy, date format requirements, required vs optional fields.
48
+
49
+ ### Stream 2: Ontology Understanding
50
+
51
+ How the skill maps to specific systems and organizations:
52
+ - Company-specific policies and constraints
53
+ - Data structures and identifiers unique to the system
54
+ - Cross-references between entities (timekeepers → IDs → rates)
55
+ - Workflow states and transitions
56
+
57
+ *Example (LEDES validation):* Firm-specific timekeeper codes, matter numbering conventions, approved billing rates, outside counsel guideline requirements.
58
+
59
+ ### Discovery Questions
60
+
61
+ When starting, I'll ask about:
62
+ 1. **Domain & Purpose** — What problem? What industry standards apply?
63
+ 2. **Ontology Requirements** — What system-specific structures must the skill understand?
64
+ 3. **Content Source** — Conversation, docs, specifications, or files to distill from?
65
+ 4. **Automation Potential** — What can be deterministic (scripts)? What needs interpretation (LLM)?
66
+ 5. **Complexity Level** — Simple (SKILL.md only), Enhanced (+scripts), or Full (+resources)?
67
+
68
+ ## Skill Architecture
69
+
70
+ ```
71
+ skill-name/
72
+ ├── SKILL.md # Layer 1: Core (300-500 tokens)
73
+ ├── scripts/ # Layer 0: Automation (0 tokens to run)
74
+ │ └── validate.py
75
+ └── resources/ # Layer 2: Details (loaded selectively)
76
+ └── ADVANCED.md
77
+ ```
78
+
79
+ **Layer 0** (Scripts): Free execution, structured JSON output
80
+ **Layer 1** (SKILL.md): Loaded when triggered - keep lean
81
+ **Layer 2** (Resources): Fetched only when specific section needed
82
+
83
+ ## Token Optimization
84
+
85
+ | Technique | Instead of | Do this | Savings |
86
+ |-----------|-----------|---------|---------|
87
+ | Scripts | 500 tokens explaining validation | `python scripts/validate.py` | ~450 tokens |
88
+ | Reference | Inline schema (200 tokens) | Link to `resources/schema.json` | ~185 tokens |
89
+ | Layer 2 | Everything in SKILL.md | Link to `resources/ADVANCED.md` | ~750 tokens |
90
+
91
+ ## Description Formula
92
+
93
+ `<Action> <Object> for <Purpose>. Use when <Trigger>.`
94
+
95
+ Example: "Validate billing data for system migration. Use before importing invoices."
96
+
97
+ ## Shipping
98
+
99
+ When content is finalized:
100
+
101
+ ```bash
102
+ python scripts/package_skill.py skill-name 1.0
103
+ ```
104
+
105
+ Creates `skill-name-v1.0.zip` with:
106
+ - DIRECTORY_STRUCTURE.txt (auto-generated)
107
+ - README.md with deployment instructions
108
+ - All skill files properly organized
109
+
110
+ ## Templates & Examples
111
+
112
+ See `resources/templates/` for:
113
+ - Minimal skill template
114
+ - Enhanced skill template
115
+ - Script template
116
+
117
+ See `resources/examples/` for domain-specific patterns.
118
+
119
+ ## Quality Checklist
120
+
121
+ Before shipping:
122
+ - [ ] Description <30 tokens
123
+ - [ ] SKILL.md <500 tokens (Layer 1)
124
+ - [ ] Scripts for deterministic operations
125
+ - [ ] Advanced content in resources/ (Layer 2)
126
+ - [ ] Version in frontmatter
127
+ - [ ] All referenced files exist
128
+
129
+ ---
130
+
131
+ **Version:** 2.2 | **Target:** <500 tokens Layer 1
@@ -0,0 +1,147 @@
1
+ # Domain Examples
2
+
3
+ Real-world skill patterns for common use cases.
4
+
5
+ ---
6
+
7
+ ## Example 1: Billing System Migration
8
+
9
+ **Context:** Company migrating from legacy billing to modern system.
10
+
11
+ **Discovery questions:**
12
+ 1. What format is legacy data? (CSV, JSON, database dump?)
13
+ 2. What's the target format for new system?
14
+ 3. Are there data transformations needed? (field mapping, calculations?)
15
+ 4. Any validation rules to enforce?
16
+ 5. How should errors be handled?
17
+
18
+ **Resulting structure:**
19
+ ```
20
+ billing-migration/
21
+ ├── SKILL.md # Migration workflow
22
+ ├── scripts/
23
+ │ ├── validate_legacy.py # Check data completeness
24
+ │ ├── transform.py # Map fields to new format
25
+ │ └── verify_totals.py # Verify financial totals match
26
+ └── resources/
27
+ ├── schemas/
28
+ │ ├── legacy.json # Legacy data schema
29
+ │ └── modern.json # Target schema
30
+ └── mappings/
31
+ └── field_mapping.json # Field-to-field mapping
32
+ ```
33
+
34
+ **Token efficiency:**
35
+ - Description: ~25 tokens
36
+ - SKILL.md: ~400 tokens
37
+ - Scripts: 0 tokens (execution is free)
38
+ - resources/: ~1200 tokens (loaded only for complex cases)
39
+
40
+ ---
41
+
42
+ ## Example 2: API Integration
43
+
44
+ **Context:** Integrating with external API, handling auth, rate limits, retries.
45
+
46
+ **Discovery questions:**
47
+ 1. What API? (OpenAPI spec available?)
48
+ 2. What endpoints are used most?
49
+ 3. How does authentication work?
50
+ 4. Are there rate limits to handle?
51
+ 5. What error cases need special handling?
52
+
53
+ **Resulting structure:**
54
+ ```
55
+ api-integration/
56
+ ├── SKILL.md # Common API patterns
57
+ ├── scripts/
58
+ │ ├── authenticate.py # Handle OAuth flow
59
+ │ ├── request.py # Wrapper with retry logic
60
+ │ └── rate_limiter.py # Respect rate limits
61
+ └── resources/
62
+ ├── openapi.json # API specification
63
+ └── templates/
64
+ └── request.json # Request body templates
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Example 3: Data Schema Mapping
70
+
71
+ **Context:** Mapping between two data formats with transformations.
72
+
73
+ **Discovery questions:**
74
+ 1. What are the source and target schemas?
75
+ 2. Are transformations simple (rename) or complex (calculations)?
76
+ 3. What happens to unmapped fields?
77
+ 4. How should validation errors be handled?
78
+
79
+ **Resulting structure:**
80
+ ```
81
+ schema-mapper/
82
+ ├── SKILL.md # Mapping workflow
83
+ ├── scripts/
84
+ │ ├── validate_source.py # Check source data
85
+ │ ├── map_fields.py # Apply mapping rules
86
+ │ └── validate_target.py # Verify output
87
+ └── resources/
88
+ ├── schemas/
89
+ │ ├── source.json
90
+ │ └── target.json
91
+ └── mappings.json # Field mapping rules
92
+ ```
93
+
94
+ ---
95
+
96
+ ## Common Patterns
97
+
98
+ ### Pattern: Validation Script
99
+ Every skill that processes data should include validation:
100
+
101
+ ```python
102
+ def validate(data, schema_path):
103
+ """Validate data against JSON schema."""
104
+ with open(schema_path) as f:
105
+ schema = json.load(f)
106
+
107
+ errors = []
108
+ for i, item in enumerate(data):
109
+ try:
110
+ jsonschema.validate(item, schema)
111
+ except jsonschema.ValidationError as e:
112
+ errors.append({"index": i, "error": e.message, "path": list(e.path)})
113
+
114
+ return {"valid": len(errors) == 0, "errors": errors}
115
+ ```
116
+
117
+ ### Pattern: Transformation Script
118
+ For data conversion:
119
+
120
+ ```python
121
+ def transform(source_data, mapping):
122
+ """Transform data using field mapping."""
123
+ results = []
124
+ for item in source_data:
125
+ transformed = {}
126
+ for target_field, source_field in mapping.items():
127
+ if isinstance(source_field, str):
128
+ transformed[target_field] = item.get(source_field)
129
+ elif callable(source_field):
130
+ transformed[target_field] = source_field(item)
131
+ results.append(transformed)
132
+ return results
133
+ ```
134
+
135
+ ### Pattern: Error Accumulation
136
+ Never fail on first error - collect all issues:
137
+
138
+ ```python
139
+ def process_batch(items):
140
+ results = {"success": [], "errors": []}
141
+ for item in items:
142
+ try:
143
+ results["success"].append(process_one(item))
144
+ except Exception as e:
145
+ results["errors"].append({"item_id": item.get("id"), "error": str(e)})
146
+ return results
147
+ ```
@@ -0,0 +1,202 @@
1
+ # Skill Templates
2
+
3
+ Templates for creating new skills. Copy and customize.
4
+
5
+ ---
6
+
7
+ ## Minimal Skill Template
8
+
9
+ For simple skills with just procedures (no scripts):
10
+
11
+ ```markdown
12
+ ---
13
+ name: skill-name
14
+ description: Action on object for purpose. Use when trigger.
15
+ version: 1.0
16
+ ---
17
+
18
+ # Skill Name: Purpose
19
+
20
+ Brief explanation of what this skill does.
21
+
22
+ ## Quick Start
23
+
24
+ Most common usage - copy-paste ready.
25
+
26
+ ## Common Scenarios
27
+
28
+ ### Scenario 1: Typical Case
29
+ Description and steps.
30
+
31
+ ### Scenario 2: Variant
32
+ How to handle variations.
33
+
34
+ ## Error Handling
35
+
36
+ - **Error X**: Cause → Fix
37
+ - **Error Y**: Cause → Fix
38
+
39
+ ---
40
+ **Version:** 1.0
41
+ ```
42
+
43
+ ---
44
+
45
+ ## Enhanced Skill Template
46
+
47
+ For skills with automation scripts:
48
+
49
+ ```markdown
50
+ ---
51
+ name: skill-name
52
+ description: Action on object for purpose. Use when trigger.
53
+ version: 1.0
54
+ ---
55
+
56
+ # Skill Name: Purpose
57
+
58
+ ## Quick Start
59
+
60
+ \`\`\`bash
61
+ python scripts/process.py --input data.json
62
+ \`\`\`
63
+
64
+ Expected output: [describe success]
65
+
66
+ ## Prerequisites
67
+
68
+ - Input format: [specify]
69
+ - Required files: [list]
70
+
71
+ ## Common Scenarios
72
+
73
+ ### Scenario 1: Standard Usage
74
+ \`\`\`bash
75
+ python scripts/process.py --input data.json --output result.json
76
+ \`\`\`
77
+
78
+ ### Scenario 2: Validation Only
79
+ \`\`\`bash
80
+ python scripts/validate.py data.json
81
+ \`\`\`
82
+
83
+ ## Error Handling
84
+
85
+ - **Error X**: Cause → Fix
86
+ - **Error Y**: Cause → Fix
87
+
88
+ ## Advanced Usage
89
+
90
+ See [ADVANCED.md](./resources/ADVANCED.md) for complex scenarios.
91
+
92
+ ---
93
+ **Version:** 1.0
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Script Template
99
+
100
+ Standard pattern for automation scripts:
101
+
102
+ ```python
103
+ #!/usr/bin/env python3
104
+ """
105
+ Script Name: Short description
106
+
107
+ Usage:
108
+ python script_name.py input.json [output.json]
109
+
110
+ Returns:
111
+ JSON with structured results:
112
+ {
113
+ "status": "success|error",
114
+ "data": {...},
115
+ "errors": [...]
116
+ }
117
+ """
118
+
119
+ import json
120
+ import sys
121
+ from pathlib import Path
122
+ from typing import Any
123
+
124
+
125
+ def process(input_path: str, output_path: str = None) -> dict[str, Any]:
126
+ """Main processing function."""
127
+ try:
128
+ with open(input_path) as f:
129
+ data = json.load(f)
130
+
131
+ # Process data
132
+ results = {"processed": [], "errors": []}
133
+ for item in data:
134
+ try:
135
+ results["processed"].append(transform(item))
136
+ except Exception as e:
137
+ results["errors"].append({"item": item.get("id"), "error": str(e)})
138
+
139
+ # Write output if specified
140
+ if output_path:
141
+ with open(output_path, 'w') as f:
142
+ json.dump(results["processed"], f, indent=2)
143
+
144
+ return {
145
+ "status": "success" if not results["errors"] else "partial",
146
+ "processed": len(results["processed"]),
147
+ "errors": results["errors"]
148
+ }
149
+
150
+ except Exception as e:
151
+ return {"status": "error", "message": str(e)}
152
+
153
+
154
+ def transform(item: dict) -> dict:
155
+ """Transform single item - customize this."""
156
+ return item
157
+
158
+
159
+ def main():
160
+ if len(sys.argv) < 2:
161
+ print(__doc__)
162
+ sys.exit(1)
163
+
164
+ input_path = sys.argv[1]
165
+ output_path = sys.argv[2] if len(sys.argv) > 2 else None
166
+
167
+ result = process(input_path, output_path)
168
+ print(json.dumps(result, indent=2))
169
+ sys.exit(0 if result["status"] == "success" else 1)
170
+
171
+
172
+ if __name__ == "__main__":
173
+ main()
174
+ ```
175
+
176
+ ---
177
+
178
+ ## DIRECTORY_STRUCTURE.txt Template
179
+
180
+ Auto-generated by `package_skill.py`, but here's the format:
181
+
182
+ ```
183
+ skill-name/
184
+ ├── SKILL.md # Main skill file (Layer 1)
185
+ ├── README.md # Deployment instructions
186
+ ├── DIRECTORY_STRUCTURE.txt # This file
187
+ ├── scripts/ # Automation scripts (Layer 0)
188
+ │ ├── process.py
189
+ │ └── README.md
190
+ └── resources/ # Reference materials (Layer 2)
191
+ ├── ADVANCED.md
192
+ └── schemas/
193
+ └── schema.json
194
+
195
+ Token Budget:
196
+ - Layer 0 (description): ~25 tokens
197
+ - Layer 1 (SKILL.md): ~400 tokens
198
+ - Layer 2 (resources/): ~1000 tokens (loaded selectively)
199
+
200
+ Version: 1.0
201
+ Created: YYYY-MM-DD
202
+ ```
@@ -0,0 +1,38 @@
1
+ # Scripts
2
+
3
+ Automation utilities for skill packaging.
4
+
5
+ ## package_skill.py
6
+
7
+ Packages a skill folder into a deployment-ready .zip file.
8
+
9
+ ### Usage
10
+
11
+ ```bash
12
+ python package_skill.py <skill-folder> <version> [output-dir]
13
+ ```
14
+
15
+ ### Examples
16
+
17
+ ```bash
18
+ # Package skill in current directory
19
+ python package_skill.py ./my-skill 1.0
20
+
21
+ # Specify output location
22
+ python package_skill.py /path/to/skill 2.0 ./releases
23
+
24
+ # Package this skill itself
25
+ python package_skill.py ../ 2.1
26
+ ```
27
+
28
+ ### What it does
29
+
30
+ 1. Validates skill folder has SKILL.md
31
+ 2. Generates `DIRECTORY_STRUCTURE.txt` with token estimates
32
+ 3. Generates `README.md` if missing
33
+ 4. Creates `skill-name-v{version}.zip`
34
+
35
+ ### Requirements
36
+
37
+ - Python 3.8+
38
+ - Standard library only (no dependencies)
@@ -0,0 +1,249 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Skill Packaging Script
4
+
5
+ Packages a skill folder into a deployment-ready .zip file.
6
+
7
+ Usage:
8
+ python package_skill.py <skill-folder> <version> [output-dir]
9
+
10
+ Examples:
11
+ python package_skill.py ./billing-migration 1.0
12
+ python package_skill.py /path/to/my-skill 2.1 ./releases
13
+
14
+ Creates:
15
+ skill-name-v{version}.zip
16
+
17
+ What it does:
18
+ 1. Validates skill folder and SKILL.md exist
19
+ 2. Generates DIRECTORY_STRUCTURE.txt
20
+ 3. Generates README.md (if missing)
21
+ 4. Creates versioned .zip file
22
+ """
23
+
24
+ import re
25
+ import shutil
26
+ import sys
27
+ from datetime import datetime
28
+ from pathlib import Path
29
+
30
+
31
+ def extract_frontmatter(skill_md_path: Path) -> dict:
32
+ """Extract YAML frontmatter from SKILL.md."""
33
+ content = skill_md_path.read_text()
34
+
35
+ if not content.startswith('---'):
36
+ return {}
37
+
38
+ parts = content.split('---', 2)
39
+ if len(parts) < 3:
40
+ return {}
41
+
42
+ frontmatter = {}
43
+ for line in parts[1].strip().split('\n'):
44
+ if ':' in line:
45
+ key, value = line.split(':', 1)
46
+ frontmatter[key.strip()] = value.strip()
47
+
48
+ return frontmatter
49
+
50
+
51
+ def estimate_tokens(text: str) -> int:
52
+ """Rough token estimate (~4 chars per token for English)."""
53
+ return len(text) // 4
54
+
55
+
56
+ def generate_directory_structure(skill_path: Path, version: str) -> str:
57
+ """Generate DIRECTORY_STRUCTURE.txt content."""
58
+
59
+ def build_tree(path: Path, prefix: str = "") -> list[str]:
60
+ """Recursively build directory tree."""
61
+ lines = []
62
+ children = sorted(path.iterdir(), key=lambda x: (x.is_file(), x.name))
63
+
64
+ for i, child in enumerate(children):
65
+ is_last = i == len(children) - 1
66
+ connector = "└── " if is_last else "├── "
67
+ suffix = "/" if child.is_dir() else ""
68
+ lines.append(f"{prefix}{connector}{child.name}{suffix}")
69
+
70
+ if child.is_dir():
71
+ extension = " " if is_last else "│ "
72
+ lines.extend(build_tree(child, prefix + extension))
73
+
74
+ return lines
75
+
76
+ # Build tree
77
+ tree_lines = [f"{skill_path.name}/"]
78
+ tree_lines.extend(build_tree(skill_path))
79
+
80
+ # Estimate tokens
81
+ skill_md = skill_path / "SKILL.md"
82
+ layer1_tokens = estimate_tokens(skill_md.read_text()) if skill_md.exists() else 0
83
+
84
+ # Extract description token count
85
+ frontmatter = extract_frontmatter(skill_md) if skill_md.exists() else {}
86
+ desc = frontmatter.get('description', '')
87
+ desc_tokens = len(desc.split())
88
+
89
+ # Layer 2 tokens
90
+ resources_path = skill_path / "resources"
91
+ layer2_tokens = 0
92
+ if resources_path.exists():
93
+ for md_file in resources_path.rglob("*.md"):
94
+ layer2_tokens += estimate_tokens(md_file.read_text())
95
+
96
+ structure = "\n".join(tree_lines)
97
+
98
+ return f"""{structure}
99
+
100
+ Token Budget:
101
+ - Layer 0 (description): ~{desc_tokens} tokens (always loaded)
102
+ - Layer 1 (SKILL.md): ~{layer1_tokens} tokens (loaded on trigger)
103
+ - Layer 2 (resources/): ~{layer2_tokens} tokens (loaded selectively)
104
+
105
+ Version: {version}
106
+ Created: {datetime.now().strftime('%Y-%m-%d')}
107
+ """
108
+
109
+
110
+ def generate_readme(skill_name: str, version: str) -> str:
111
+ """Generate README.md with deployment instructions."""
112
+ title = skill_name.replace('-', ' ').replace('_', ' ').title()
113
+
114
+ return f"""# {title}
115
+
116
+ **Version:** {version}
117
+ **Created:** {datetime.now().strftime('%Y-%m-%d')}
118
+
119
+ ## Quick Deploy
120
+
121
+ 1. **Unzip**
122
+ ```bash
123
+ unzip {skill_name}-v{version}.zip
124
+ ```
125
+
126
+ 2. **Install in Claude Desktop**
127
+ - Open Claude Desktop → Settings → Capabilities → Skills
128
+ - Click "Add Skill" or "Upload Skill"
129
+ - Select the `{skill_name}` folder
130
+
131
+ 3. **Verify**
132
+ - Skill appears in your skills list
133
+ - Available in all conversations
134
+
135
+ ## Alternative: Manual Installation
136
+
137
+ ```bash
138
+ # Mac/Linux
139
+ cp -r {skill_name} ~/Library/Application\\ Support/Claude/skills/
140
+
141
+ # Windows
142
+ copy {skill_name} %APPDATA%\\Claude\\skills\\
143
+ ```
144
+
145
+ ## Structure
146
+
147
+ See `DIRECTORY_STRUCTURE.txt` for layout and token budget.
148
+
149
+ ## Usage
150
+
151
+ See `SKILL.md` for:
152
+ - Quick start
153
+ - Common scenarios
154
+ - Error handling
155
+
156
+ ---
157
+
158
+ **Ready to use!**
159
+ """
160
+
161
+
162
+ def package_skill(skill_path: Path, version: str, output_dir: Path = None) -> Path:
163
+ """
164
+ Package skill into deployment-ready .zip file.
165
+
166
+ Args:
167
+ skill_path: Path to skill folder
168
+ version: Version number (e.g., "1.0")
169
+ output_dir: Where to create .zip (default: current directory)
170
+
171
+ Returns:
172
+ Path to created .zip file
173
+ """
174
+ skill_path = skill_path.resolve()
175
+ output_dir = (output_dir or Path.cwd()).resolve()
176
+
177
+ # Validate
178
+ if not skill_path.exists():
179
+ raise FileNotFoundError(f"Skill folder not found: {skill_path}")
180
+
181
+ skill_md = skill_path / "SKILL.md"
182
+ if not skill_md.exists():
183
+ raise FileNotFoundError(f"SKILL.md not found in {skill_path}")
184
+
185
+ if not re.match(r'^\d+\.\d+$', version):
186
+ raise ValueError(f"Invalid version format: {version}. Use X.Y (e.g., 1.0, 2.1)")
187
+
188
+ skill_name = skill_path.name
189
+ print(f"📦 Packaging: {skill_name} v{version}")
190
+ print(f" Source: {skill_path}")
191
+
192
+ # Generate DIRECTORY_STRUCTURE.txt
193
+ structure_content = generate_directory_structure(skill_path, version)
194
+ (skill_path / "DIRECTORY_STRUCTURE.txt").write_text(structure_content)
195
+ print(" ✓ Generated DIRECTORY_STRUCTURE.txt")
196
+
197
+ # Generate README.md if missing
198
+ readme_path = skill_path / "README.md"
199
+ if not readme_path.exists():
200
+ readme_path.write_text(generate_readme(skill_name, version))
201
+ print(" ✓ Generated README.md")
202
+ else:
203
+ print(" ✓ Using existing README.md")
204
+
205
+ # Create zip
206
+ zip_name = f"{skill_name}-v{version}"
207
+ zip_path = output_dir / f"{zip_name}.zip"
208
+
209
+ if zip_path.exists():
210
+ zip_path.unlink()
211
+
212
+ # Create zip with skill folder as root
213
+ shutil.make_archive(
214
+ str(output_dir / zip_name),
215
+ 'zip',
216
+ skill_path.parent,
217
+ skill_name
218
+ )
219
+
220
+ size_kb = zip_path.stat().st_size / 1024
221
+ print(f" ✓ Created {zip_path.name} ({size_kb:.1f} KB)")
222
+
223
+ print(f"\n✅ Package ready: {zip_path}")
224
+ print("\nTo deploy:")
225
+ print("1. Unzip the package")
226
+ print("2. Claude Desktop → Settings → Skills → Add Skill")
227
+ print("3. Select the skill folder")
228
+
229
+ return zip_path
230
+
231
+
232
+ def main():
233
+ if len(sys.argv) < 3:
234
+ print(__doc__)
235
+ sys.exit(1)
236
+
237
+ skill_path = Path(sys.argv[1])
238
+ version = sys.argv[2]
239
+ output_dir = Path(sys.argv[3]) if len(sys.argv) > 3 else None
240
+
241
+ try:
242
+ package_skill(skill_path, version, output_dir)
243
+ except Exception as e:
244
+ print(f"\n❌ Error: {e}", file=sys.stderr)
245
+ sys.exit(1)
246
+
247
+
248
+ if __name__ == "__main__":
249
+ main()
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  <p align="center">
8
8
  <strong>Homebrew for AI agent skills.</strong><br>
9
- One command. Ten agents. Skills that follow you.
9
+ Universal Skills installer for any agent that follows the open standard spec
10
10
  </p>
11
11
 
12
12
  <p align="center">
@@ -179,10 +179,8 @@ cp -r Ai-Agent-Skills/skills/pdf ~/.claude/skills/
179
179
 
180
180
  ## Create Your Own
181
181
 
182
- Two options:
183
182
 
184
- 1. **Generate in 30 seconds**: [skillcreator.ai/build](https://skillcreator.ai/build)
185
- 2. **Build manually**: Follow the [Agent Skills spec](https://agentskills.io/specification)
183
+ 1. **Build manually**: Follow the [Agent Skills spec](https://agentskills.io/specification)
186
184
 
187
185
  ## What Are Agent Skills?
188
186
 
@@ -209,19 +207,17 @@ We review all contributions for quality and spec compliance.
209
207
 
210
208
  ## Links
211
209
 
212
- - [Awesome Agent Skills](https://github.com/skillcreatorai/Awesome-Agent-Skills) - Curated list of 50+ skills
210
+
213
211
  - [Agent Skills Spec](https://agentskills.io) - Official format documentation
214
- - [Browse Skills](https://skillcreator.ai/discover) - Visual skill gallery with one-click install
215
- - [Create Skills](https://skillcreator.ai/build) - Generate skills from plain English
212
+ - [Browse Skills](https://skillcreator.ai/explore) - Visual skill gallery with one-click install
213
+ - [Create Skills](https://skillcreator.ai/build) - Generate skills (waitlist)
216
214
  - [Anthropic Skills](https://github.com/anthropics/skills) - Official example skills
217
215
 
218
216
  ## See Also
219
217
 
220
- **[openskills](https://github.com/numman-ali/openskills)** - Universal skills loader that inspired parts of this project. openskills focuses on flexibility: install from any GitHub repo, sync to AGENTS.md, works with any agent via CLI calls. Great if you need maximum customization.
221
-
222
- **We took a different approach**: Homebrew-style simplicity. No global install, no sync step, no AGENTS.md. Just `npx ai-agent-skills install pdf` and it lands in the right folder for your agent. Curated catalog, native paths, zero config.
218
+ **[openskills](https://github.com/numman-ali/openskills)** - another universal skills loader that inspired parts of this project (created pre the open agent skills standard) & Requires global install, AGENTS.md sync, and Bash calls. Great for flexibility.
223
219
 
224
- Different tools for different needs.
220
+ **ai-agent-skills** - Just `npx`, installs to native agent folders. Homebrew for skills.
225
221
 
226
222
  ---
227
223
 
package/cli.js CHANGED
@@ -211,7 +211,13 @@ function copyDir(src, dest, currentSize = { total: 0 }) {
211
211
 
212
212
  const entries = fs.readdirSync(src, { withFileTypes: true });
213
213
 
214
+ // Files/folders to skip during copy
215
+ const skipList = ['.git', '.github', 'node_modules', '.DS_Store'];
216
+
214
217
  for (const entry of entries) {
218
+ // Skip unnecessary files/folders
219
+ if (skipList.includes(entry.name)) continue;
220
+
215
221
  const srcPath = path.join(src, entry.name);
216
222
  const destPath = path.join(dest, entry.name);
217
223
 
@@ -768,11 +774,18 @@ async function browseSkills(agent = 'claude') {
768
774
  // ============ EXTERNAL INSTALL (GitHub/Local) ============
769
775
 
770
776
  function isGitHubUrl(source) {
771
- return source.includes('/') && !source.startsWith('.') && !source.startsWith('/') && !source.startsWith('~');
777
+ // Must have owner/repo format, not start with path indicators
778
+ return source.includes('/') &&
779
+ !source.startsWith('./') &&
780
+ !source.startsWith('../') &&
781
+ !source.startsWith('/') &&
782
+ !source.startsWith('~');
772
783
  }
773
784
 
774
785
  function isLocalPath(source) {
775
- return source.startsWith('.') || source.startsWith('/') || source.startsWith('~');
786
+ // Only explicit local paths: ./ or / or ~/
787
+ // NOT ../ (that's path traversal, should be rejected)
788
+ return source.startsWith('./') || source.startsWith('/') || source.startsWith('~/');
776
789
  }
777
790
 
778
791
  function expandPath(p) {
@@ -816,6 +829,9 @@ async function installFromGitHub(source, agent = 'claude', dryRun = false) {
816
829
  ? path.join(tempDir, 'skills')
817
830
  : tempDir;
818
831
 
832
+ // Check if repo root IS a skill (has SKILL.md at root)
833
+ const isRootSkill = fs.existsSync(path.join(tempDir, 'SKILL.md'));
834
+
819
835
  if (skillName) {
820
836
  // Install specific skill
821
837
  const skillPath = path.join(skillsDir, skillName);
@@ -835,6 +851,19 @@ async function installFromGitHub(source, agent = 'claude', dryRun = false) {
835
851
  copyDir(skillPath, destPath);
836
852
  success(`\nInstalled: ${skillName} from ${owner}/${repo}`);
837
853
  info(`Location: ${destPath}`);
854
+ } else if (isRootSkill) {
855
+ // Repo itself is a single skill
856
+ const skillName = repo;
857
+ const destDir = AGENT_PATHS[agent] || AGENT_PATHS.claude;
858
+ const destPath = path.join(destDir, skillName);
859
+
860
+ if (!fs.existsSync(destDir)) {
861
+ fs.mkdirSync(destDir, { recursive: true });
862
+ }
863
+
864
+ copyDir(tempDir, destPath);
865
+ success(`\nInstalled: ${skillName} from ${owner}/${repo}`);
866
+ info(`Location: ${destPath}`);
838
867
  } else {
839
868
  // Install all skills from repo
840
869
  const entries = fs.readdirSync(skillsDir, { withFileTypes: true });
@@ -970,6 +999,7 @@ ${colors.bold}Commands:${colors.reset}
970
999
  ${colors.green}search <query>${colors.reset} Search skills by name, description, or tags
971
1000
  ${colors.green}info <name>${colors.reset} Show skill details
972
1001
  ${colors.green}config${colors.reset} Show/edit configuration
1002
+ ${colors.green}version${colors.reset} Show version number
973
1003
  ${colors.green}help${colors.reset} Show this help
974
1004
 
975
1005
  ${colors.bold}Options:${colors.reset}
@@ -978,6 +1008,7 @@ ${colors.bold}Options:${colors.reset}
978
1008
  ${colors.cyan}--dry-run, -n${colors.reset} Preview changes without applying
979
1009
  ${colors.cyan}--category <c>${colors.reset} Filter by category
980
1010
  ${colors.cyan}--all${colors.reset} Apply to all (with update)
1011
+ ${colors.cyan}--version, -v${colors.reset} Show version number
981
1012
 
982
1013
  ${colors.bold}Agents:${colors.reset}
983
1014
  ${colors.cyan}claude${colors.reset} (default) ~/.claude/skills/
@@ -1202,6 +1233,13 @@ switch (command || 'help') {
1202
1233
  showHelp();
1203
1234
  break;
1204
1235
 
1236
+ case 'version':
1237
+ case '--version':
1238
+ case '-v':
1239
+ const pkg = require('./package.json');
1240
+ log(`ai-agent-skills v${pkg.version}`);
1241
+ break;
1242
+
1205
1243
  default:
1206
1244
  // If command looks like a skill name, try to install it
1207
1245
  if (getAvailableSkills().includes(command)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-agent-skills",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Install curated AI agent skills with one command. Works with Claude Code, Cursor, Amp, VS Code, and all Agent Skills compatible tools.",
5
5
  "main": "cli.js",
6
6
  "bin": {
package/skills.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "1.2.0",
3
- "updated": "2025-12-20T00:00:00Z",
2
+ "version": "1.2.1",
3
+ "updated": "2025-12-25T00:00:00Z",
4
4
  "total": 39,
5
5
  "skills": [
6
6
  {
@@ -516,7 +516,7 @@
516
516
  "id": "development",
517
517
  "name": "Development",
518
518
  "description": "Coding and software development skills",
519
- "count": 12
519
+ "count": 13
520
520
  },
521
521
  {
522
522
  "id": "document",
@@ -528,19 +528,19 @@
528
528
  "id": "creative",
529
529
  "name": "Creative",
530
530
  "description": "Design and creative skills",
531
- "count": 2
531
+ "count": 6
532
532
  },
533
533
  {
534
534
  "id": "business",
535
535
  "name": "Business",
536
536
  "description": "Business and communication skills",
537
- "count": 2
537
+ "count": 5
538
538
  },
539
539
  {
540
540
  "id": "productivity",
541
541
  "name": "Productivity",
542
542
  "description": "Productivity and workflow skills",
543
- "count": 3
543
+ "count": 11
544
544
  }
545
545
  ]
546
546
  }