agentskill-cli 1.0.0__tar.gz

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,191 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentskill-cli
3
+ Version: 1.0.0
4
+ Summary: Universal AI Skill Manager for GitHub Copilot, Claude, Cursor
5
+ Author: Parth
6
+ License: MIT
7
+ Keywords: ai,copilot,claude,cursor,skills,cli
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Software Development
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: typer>=0.9.0
17
+
18
+ # AgentSkill πŸ› οΈ
19
+
20
+ **Universal AI Skill Manager** β€” Manage skills for GitHub Copilot, Claude Code, Cursor, and more.
21
+
22
+ ## Features
23
+
24
+ - βœ… **Zero Config**: No setup needed, just install and use
25
+ - βœ… **Multi-AI Support**: GitHub Copilot, Claude Code, Cursor
26
+ - βœ… **Any Language**: Python, JavaScript, Go, Rust, Dart, etc.
27
+ - βœ… **Framework Templates**: React, Django, FastAPI, Flutter, Gin, etc.
28
+ - βœ… **One Command Install**: Auto-detects AI tools in project
29
+ - βœ… **Sync Updates**: Update skill β†’ all projects sync automatically
30
+
31
+ ## Installation (One Time)
32
+
33
+ ```bash
34
+ cd /path/to/Agent_Skill
35
+ pip install -e .
36
+ ```
37
+
38
+ That's it! Now `agentskill` command works globally.
39
+
40
+ ## Quick Start
41
+
42
+ ```bash
43
+ # Create a skill (auto-stored in ~/.agentskill/skills/)
44
+ agentskill create react-rules -l javascript -f react
45
+
46
+ # Go to any project and install
47
+ cd /your/react-project
48
+ agentskill install react-rules
49
+
50
+ # Done! AI will follow your rules
51
+ ```
52
+
53
+ ## Commands
54
+
55
+ | Command | Description |
56
+ |---------|-------------|
57
+ | `create <name>` | Create new skill |
58
+ | `install <name>` | Install in current project |
59
+ | `list` | Show all skills |
60
+ | `show <name>` | View skill details |
61
+ | `edit <name>` | Open in editor |
62
+ | `update <name>` | Sync to all projects |
63
+ | `delete <name>` | Remove skill |
64
+ | `export <name>` | Export as zip |
65
+ | `import <zip>` | Import from zip |
66
+ | `init` | Create AI folders |
67
+ | `where` | Show storage location |
68
+
69
+ **Shortcut**: Use `ask` instead of `agentskill`
70
+
71
+ ## Creating Skills
72
+
73
+ ### Basic
74
+
75
+ ```bash
76
+ agentskill create my-rules
77
+ ```
78
+
79
+ ### With Language & Framework
80
+
81
+ ```bash
82
+ # React skill
83
+ agentskill create react-component -l javascript -f react
84
+
85
+ # Django skill
86
+ agentskill create django-api -l python -f django
87
+
88
+ # Flutter skill
89
+ agentskill create flutter-widget -l dart -f flutter
90
+
91
+ # Go API skill
92
+ agentskill create go-api -l go -f gin
93
+ ```
94
+
95
+ ### Supported Templates
96
+
97
+ | Language | Frameworks |
98
+ |----------|------------|
99
+ | Python | django, fastapi, flask |
100
+ | JavaScript | react, nextjs, node |
101
+ | Dart | flutter |
102
+ | Go | gin, fiber |
103
+ | Rust | actix, axum |
104
+
105
+ ## Installing Skills
106
+
107
+ ### Auto-detect (recommended)
108
+
109
+ ```bash
110
+ cd /path/to/project
111
+ agentskill install my-skill
112
+ ```
113
+
114
+ Auto-detects `.github/`, `.claude/`, `.cursor/` folders.
115
+
116
+ ### Specific Tool
117
+
118
+ ```bash
119
+ # GitHub Copilot only
120
+ agentskill install my-skill -t copilot
121
+
122
+ # Claude only
123
+ agentskill install my-skill -t claude
124
+
125
+ # All tools
126
+ agentskill install my-skill -t all
127
+ ```
128
+
129
+ ## Skill Structure
130
+
131
+ ```
132
+ my-skill/
133
+ β”œβ”€β”€ SKILL.md # Main instructions (Copilot format)
134
+ β”œβ”€β”€ skill.yaml # SkillForge metadata
135
+ β”œβ”€β”€ instructions.md # Legacy format
136
+ β”œβ”€β”€ scripts/ # Helper scripts
137
+ β”œβ”€β”€ references/ # Additional docs
138
+ └── assets/ # Templates, boilerplate
139
+ ```
140
+
141
+ ## Editing Skills
142
+
143
+ ```bash
144
+ # Open in editor (VS Code, Cursor, etc.)
145
+ agentskill edit my-skill
146
+
147
+ # Or show details first
148
+ agentskill show my-skill
149
+ ```
150
+
151
+ After editing, update all projects:
152
+ ```bash
153
+ agentskill update my-skill
154
+ ```
155
+
156
+ ## Sharing Skills
157
+
158
+ ```bash
159
+ # Export
160
+ agentskill export my-skill
161
+
162
+ # Import
163
+ agentskill import my-skill.skill.zip
164
+ ```
165
+
166
+ ## How It Works
167
+
168
+ 1. **Skills are stored** in `~/.agentskill/skills/` (automatic)
169
+ 2. **Install copies** skill to your project's AI folder
170
+ 3. **AI reads** the SKILL.md when you code
171
+
172
+ ```
173
+ ~/.agentskill/skills/ Your Projects
174
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
175
+ β”‚ react-rules/ β”‚ β”‚ my-react-app/ β”‚
176
+ β”‚ └── SKILL.md │──copy──▢│ └── .github/ β”‚
177
+ β”‚ django-api/ β”‚ β”‚ └── skillsβ”‚
178
+ β”‚ └── SKILL.md β”‚ β”‚ └── react-rules/
179
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
180
+ ```
181
+
182
+ ## Tips
183
+
184
+ - Keep SKILL.md under 500 lines
185
+ - Use `references/` for detailed docs
186
+ - Add code examples in `references/examples.md`
187
+ - Use specific trigger words in descriptions
188
+
189
+ ## License
190
+
191
+ MIT
@@ -0,0 +1,174 @@
1
+ # AgentSkill πŸ› οΈ
2
+
3
+ **Universal AI Skill Manager** β€” Manage skills for GitHub Copilot, Claude Code, Cursor, and more.
4
+
5
+ ## Features
6
+
7
+ - βœ… **Zero Config**: No setup needed, just install and use
8
+ - βœ… **Multi-AI Support**: GitHub Copilot, Claude Code, Cursor
9
+ - βœ… **Any Language**: Python, JavaScript, Go, Rust, Dart, etc.
10
+ - βœ… **Framework Templates**: React, Django, FastAPI, Flutter, Gin, etc.
11
+ - βœ… **One Command Install**: Auto-detects AI tools in project
12
+ - βœ… **Sync Updates**: Update skill β†’ all projects sync automatically
13
+
14
+ ## Installation (One Time)
15
+
16
+ ```bash
17
+ cd /path/to/Agent_Skill
18
+ pip install -e .
19
+ ```
20
+
21
+ That's it! Now `agentskill` command works globally.
22
+
23
+ ## Quick Start
24
+
25
+ ```bash
26
+ # Create a skill (auto-stored in ~/.agentskill/skills/)
27
+ agentskill create react-rules -l javascript -f react
28
+
29
+ # Go to any project and install
30
+ cd /your/react-project
31
+ agentskill install react-rules
32
+
33
+ # Done! AI will follow your rules
34
+ ```
35
+
36
+ ## Commands
37
+
38
+ | Command | Description |
39
+ |---------|-------------|
40
+ | `create <name>` | Create new skill |
41
+ | `install <name>` | Install in current project |
42
+ | `list` | Show all skills |
43
+ | `show <name>` | View skill details |
44
+ | `edit <name>` | Open in editor |
45
+ | `update <name>` | Sync to all projects |
46
+ | `delete <name>` | Remove skill |
47
+ | `export <name>` | Export as zip |
48
+ | `import <zip>` | Import from zip |
49
+ | `init` | Create AI folders |
50
+ | `where` | Show storage location |
51
+
52
+ **Shortcut**: Use `ask` instead of `agentskill`
53
+
54
+ ## Creating Skills
55
+
56
+ ### Basic
57
+
58
+ ```bash
59
+ agentskill create my-rules
60
+ ```
61
+
62
+ ### With Language & Framework
63
+
64
+ ```bash
65
+ # React skill
66
+ agentskill create react-component -l javascript -f react
67
+
68
+ # Django skill
69
+ agentskill create django-api -l python -f django
70
+
71
+ # Flutter skill
72
+ agentskill create flutter-widget -l dart -f flutter
73
+
74
+ # Go API skill
75
+ agentskill create go-api -l go -f gin
76
+ ```
77
+
78
+ ### Supported Templates
79
+
80
+ | Language | Frameworks |
81
+ |----------|------------|
82
+ | Python | django, fastapi, flask |
83
+ | JavaScript | react, nextjs, node |
84
+ | Dart | flutter |
85
+ | Go | gin, fiber |
86
+ | Rust | actix, axum |
87
+
88
+ ## Installing Skills
89
+
90
+ ### Auto-detect (recommended)
91
+
92
+ ```bash
93
+ cd /path/to/project
94
+ agentskill install my-skill
95
+ ```
96
+
97
+ Auto-detects `.github/`, `.claude/`, `.cursor/` folders.
98
+
99
+ ### Specific Tool
100
+
101
+ ```bash
102
+ # GitHub Copilot only
103
+ agentskill install my-skill -t copilot
104
+
105
+ # Claude only
106
+ agentskill install my-skill -t claude
107
+
108
+ # All tools
109
+ agentskill install my-skill -t all
110
+ ```
111
+
112
+ ## Skill Structure
113
+
114
+ ```
115
+ my-skill/
116
+ β”œβ”€β”€ SKILL.md # Main instructions (Copilot format)
117
+ β”œβ”€β”€ skill.yaml # SkillForge metadata
118
+ β”œβ”€β”€ instructions.md # Legacy format
119
+ β”œβ”€β”€ scripts/ # Helper scripts
120
+ β”œβ”€β”€ references/ # Additional docs
121
+ └── assets/ # Templates, boilerplate
122
+ ```
123
+
124
+ ## Editing Skills
125
+
126
+ ```bash
127
+ # Open in editor (VS Code, Cursor, etc.)
128
+ agentskill edit my-skill
129
+
130
+ # Or show details first
131
+ agentskill show my-skill
132
+ ```
133
+
134
+ After editing, update all projects:
135
+ ```bash
136
+ agentskill update my-skill
137
+ ```
138
+
139
+ ## Sharing Skills
140
+
141
+ ```bash
142
+ # Export
143
+ agentskill export my-skill
144
+
145
+ # Import
146
+ agentskill import my-skill.skill.zip
147
+ ```
148
+
149
+ ## How It Works
150
+
151
+ 1. **Skills are stored** in `~/.agentskill/skills/` (automatic)
152
+ 2. **Install copies** skill to your project's AI folder
153
+ 3. **AI reads** the SKILL.md when you code
154
+
155
+ ```
156
+ ~/.agentskill/skills/ Your Projects
157
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
158
+ β”‚ react-rules/ β”‚ β”‚ my-react-app/ β”‚
159
+ β”‚ └── SKILL.md │──copy──▢│ └── .github/ β”‚
160
+ β”‚ django-api/ β”‚ β”‚ └── skillsβ”‚
161
+ β”‚ └── SKILL.md β”‚ β”‚ └── react-rules/
162
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
163
+ ```
164
+
165
+ ## Tips
166
+
167
+ - Keep SKILL.md under 500 lines
168
+ - Use `references/` for detailed docs
169
+ - Add code examples in `references/examples.md`
170
+ - Use specific trigger words in descriptions
171
+
172
+ ## License
173
+
174
+ MIT
@@ -0,0 +1,522 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ AgentSkill - Universal AI Skill Manager (Zero Config Edition)
4
+ ==============================================================
5
+ Manage skills for GitHub Copilot, Claude Code, Cursor, and more.
6
+ Works with any programming language/framework. No path configuration needed!
7
+
8
+ Install: pip install -e .
9
+ Usage: agentskill create my-skill
10
+ agentskill install my-skill
11
+ agentskill list
12
+
13
+ Short: ask create my-skill
14
+ """
15
+
16
+ import typer
17
+ import shutil
18
+ import json
19
+ import zipfile
20
+ import os
21
+ from pathlib import Path
22
+ from typing import Optional
23
+ from datetime import datetime
24
+
25
+ app = typer.Typer(help="AgentSkill - Universal AI Skill Manager πŸ› οΈ")
26
+
27
+ # ═══════════════════════════════════════════════════════════════════
28
+ # AUTO CONFIG - No manual setup needed!
29
+ # ═══════════════════════════════════════════════════════════════════
30
+
31
+ def get_default_skills_path() -> Path:
32
+ """Auto-detect best location for skills folder"""
33
+ xdg_data = os.environ.get("XDG_DATA_HOME")
34
+ if xdg_data:
35
+ return Path(xdg_data) / "agentskill" / "skills"
36
+ return Path.home() / ".agentskill" / "skills"
37
+
38
+ def get_config_path() -> Path:
39
+ """Get config file path"""
40
+ xdg_config = os.environ.get("XDG_CONFIG_HOME")
41
+ if xdg_config:
42
+ return Path(xdg_config) / "agentskill" / "config.json"
43
+ return Path.home() / ".agentskill" / "config.json"
44
+
45
+ CONFIG_FILE = get_config_path()
46
+
47
+ def load_config() -> dict:
48
+ """Load config, auto-create if missing"""
49
+ if CONFIG_FILE.exists():
50
+ return json.loads(CONFIG_FILE.read_text())
51
+
52
+ # Auto-create default config
53
+ default_config = {
54
+ "skills_path": str(get_default_skills_path()),
55
+ "installed_projects": {},
56
+ "auto_created": True,
57
+ "created_at": datetime.now().isoformat()
58
+ }
59
+ save_config(default_config)
60
+
61
+ # Create skills folder
62
+ Path(default_config["skills_path"]).mkdir(parents=True, exist_ok=True)
63
+
64
+ return default_config
65
+
66
+ def save_config(config: dict):
67
+ """Save config to file"""
68
+ CONFIG_FILE.parent.mkdir(parents=True, exist_ok=True)
69
+ CONFIG_FILE.write_text(json.dumps(config, indent=2))
70
+
71
+ def get_skill_path(name: str) -> Path:
72
+ """Get skill folder path"""
73
+ config = load_config()
74
+ return Path(config["skills_path"]) / name
75
+
76
+ def find_project_root(start_path: Path = None) -> Path:
77
+ """Use current directory as project root. Simple and predictable."""
78
+ if start_path is None:
79
+ return Path.cwd()
80
+ return start_path.resolve()
81
+
82
+ # ═══════════════════════════════════════════════════════════════════
83
+ # SKILL TEMPLATES
84
+ # ═══════════════════════════════════════════════════════════════════
85
+
86
+ SKILL_TEMPLATES = {
87
+ "python": {
88
+ "rules": """
89
+ ## Python Rules
90
+ - Use type hints for all functions
91
+ - Follow PEP 8 style guide
92
+ - Use `pathlib` instead of `os.path`
93
+ - Prefer f-strings over .format()
94
+ - Use dataclasses or Pydantic for data models
95
+ - Handle exceptions explicitly
96
+ """,
97
+ "frameworks": {
98
+ "django": """
99
+ ## Django Rules
100
+ - Use class-based views when logic is complex
101
+ - Always use Django ORM, avoid raw SQL
102
+ - Use Django REST Framework for APIs
103
+ - Keep business logic in services/managers, not views
104
+ """,
105
+ "fastapi": """
106
+ ## FastAPI Rules
107
+ - Use Pydantic models for request/response
108
+ - Use dependency injection for services
109
+ - Use async/await for I/O operations
110
+ - Keep routes thin, business logic in services
111
+ """,
112
+ "flask": """
113
+ ## Flask Rules
114
+ - Use Blueprints for large apps
115
+ - Use Flask-SQLAlchemy for database
116
+ - Keep routes in separate files
117
+ """
118
+ }
119
+ },
120
+ "javascript": {
121
+ "rules": """
122
+ ## JavaScript/TypeScript Rules
123
+ - Use TypeScript for new projects
124
+ - Use const/let, never var
125
+ - Use async/await over callbacks
126
+ - Use optional chaining (?.) and nullish coalescing (??)
127
+ """,
128
+ "frameworks": {
129
+ "react": """
130
+ ## React Rules
131
+ - Use functional components with hooks
132
+ - Keep components small and focused
133
+ - Use custom hooks for reusable logic
134
+ - Always use keys in lists
135
+ """,
136
+ "nextjs": """
137
+ ## Next.js Rules
138
+ - Use App Router (app/) for new projects
139
+ - Use Server Components by default
140
+ - Use route handlers for API routes
141
+ """,
142
+ "node": """
143
+ ## Node.js Rules
144
+ - Use async/await for I/O
145
+ - Handle errors with try/catch
146
+ - Use environment variables for config
147
+ """
148
+ }
149
+ },
150
+ "dart": {
151
+ "rules": """
152
+ ## Dart Rules
153
+ - Use null safety
154
+ - Use const constructors when possible
155
+ - Use named parameters for clarity
156
+ """,
157
+ "frameworks": {
158
+ "flutter": """
159
+ ## Flutter Rules
160
+ - Use BLoC or Riverpod for state management
161
+ - Keep widgets small and reusable
162
+ - Use const widgets for performance
163
+ - Separate business logic from UI
164
+ """
165
+ }
166
+ },
167
+ "go": {
168
+ "rules": """
169
+ ## Go Rules
170
+ - Handle errors explicitly
171
+ - Use interfaces for abstraction
172
+ - Keep functions small
173
+ - Use context for cancellation
174
+ """,
175
+ "frameworks": {
176
+ "gin": "## Gin Rules\n- Use middleware for common logic\n- Use groups for route organization",
177
+ "fiber": "## Fiber Rules\n- Use middleware for auth/logging\n- Keep handlers thin"
178
+ }
179
+ },
180
+ "rust": {
181
+ "rules": """
182
+ ## Rust Rules
183
+ - Use Result<T, E> for error handling
184
+ - Prefer borrowing over ownership transfer
185
+ - Use clippy and rustfmt
186
+ - Avoid unwrap() in production code
187
+ """,
188
+ "frameworks": {
189
+ "actix": "## Actix-web Rules\n- Use extractors for request data\n- Use middleware for common logic",
190
+ "axum": "## Axum Rules\n- Use extractors for request parts\n- Use Tower middleware"
191
+ }
192
+ }
193
+ }
194
+
195
+ def get_template_content(language: str, framework: str) -> str:
196
+ """Get template content based on language and framework"""
197
+ content = ""
198
+ lang_template = SKILL_TEMPLATES.get(language.lower(), {})
199
+ if lang_template:
200
+ content += lang_template.get("rules", "")
201
+ if framework and framework != "general":
202
+ fw_rules = lang_template.get("frameworks", {}).get(framework.lower(), "")
203
+ content += "\n" + fw_rules
204
+ return content
205
+
206
+ # ═══════════════════════════════════════════════════════════════════
207
+ # COMMANDS
208
+ # ═══════════════════════════════════════════════════════════════════
209
+
210
+ @app.command()
211
+ def create(
212
+ name: str,
213
+ language: str = typer.Option("python", "--lang", "-l", help="Programming language"),
214
+ framework: str = typer.Option("general", "--framework", "-f", help="Framework name"),
215
+ description: str = typer.Option("", "--desc", "-d", help="Skill description")
216
+ ):
217
+ """
218
+ Create a new skill. Auto-stores in ~/.agentskill/skills/
219
+
220
+ Examples:
221
+ agentskill create react-rules -l javascript -f react
222
+ agentskill create django-api -l python -f django
223
+ """
224
+ load_config() # Auto-creates config if missing
225
+
226
+ skill_dir = get_skill_path(name)
227
+ skill_dir.mkdir(parents=True, exist_ok=True)
228
+
229
+ # Create subfolders
230
+ (skill_dir / "scripts").mkdir(exist_ok=True)
231
+ (skill_dir / "references").mkdir(exist_ok=True)
232
+ (skill_dir / "assets").mkdir(exist_ok=True)
233
+
234
+ # Generate description
235
+ if not description:
236
+ description = f"Rules for {framework} development in {language}. Use when working with {language} {framework} code."
237
+
238
+ # Create skill.yaml
239
+ (skill_dir / "skill.yaml").write_text(f"""name: {name}
240
+ description: {description}
241
+ language: {language}
242
+ framework: {framework}
243
+ version: 1.0
244
+ created: {datetime.now().strftime('%Y-%m-%d')}
245
+ """)
246
+
247
+ # Get template
248
+ template_content = get_template_content(language, framework)
249
+
250
+ # Create SKILL.md
251
+ skill_md = f"""---
252
+ name: {name}
253
+ description: '{description}'
254
+ ---
255
+
256
+ # {name.replace('-', ' ').title()}
257
+
258
+ ## Overview
259
+ This skill provides coding rules for **{language}** with **{framework}**.
260
+
261
+ ## When to Use
262
+ - Working on {language} projects
263
+ - Using {framework} framework
264
+
265
+ {template_content}
266
+
267
+ ## Custom Rules
268
+ Add your own rules below:
269
+
270
+ -
271
+ """
272
+ (skill_dir / "SKILL.md").write_text(skill_md)
273
+ (skill_dir / "instructions.md").write_text(skill_md)
274
+
275
+ # Create example reference
276
+ (skill_dir / "references" / "examples.md").write_text(f"""# {name} Examples
277
+
278
+ ## Good Examples
279
+ ```{language}
280
+ # Add good code examples here
281
+ ```
282
+ """)
283
+
284
+ typer.echo(f"""
285
+ βœ… Skill '{name}' created!
286
+
287
+ πŸ“ {skill_dir}
288
+
289
+ Next:
290
+ agentskill edit {name} # Edit rules
291
+ agentskill install {name} # Install in project
292
+ """)
293
+
294
+
295
+ @app.command()
296
+ def install(
297
+ name: str,
298
+ tool: Optional[str] = typer.Option(None, "--tool", "-t", help="copilot, claude, cursor, or all")
299
+ ):
300
+ """
301
+ Install skill in current project. Auto-detects project root.
302
+
303
+ Just cd to your project and run:
304
+ agentskill install my-skill
305
+ """
306
+ config = load_config()
307
+
308
+ master_skill = get_skill_path(name)
309
+ if not master_skill.exists():
310
+ skills = [s.name for s in Path(config["skills_path"]).iterdir() if s.is_dir()]
311
+ typer.echo(f"❌ Skill '{name}' not found!")
312
+ if skills:
313
+ typer.echo(f" Available: {', '.join(skills)}")
314
+ raise typer.Exit(1)
315
+
316
+ # Auto-detect project root
317
+ project = find_project_root()
318
+ installed = []
319
+
320
+ def install_copilot():
321
+ target = project / ".github" / "skills" / name
322
+ target.mkdir(parents=True, exist_ok=True)
323
+ shutil.copy(master_skill / "SKILL.md", target / "SKILL.md")
324
+ if (master_skill / "references").exists():
325
+ shutil.copytree(master_skill / "references", target / "references", dirs_exist_ok=True)
326
+ if (master_skill / "scripts").exists():
327
+ shutil.copytree(master_skill / "scripts", target / "scripts", dirs_exist_ok=True)
328
+ installed.append("GitHub Copilot")
329
+
330
+ def install_claude():
331
+ target = project / ".claude" / "skills" / name
332
+ target.mkdir(parents=True, exist_ok=True)
333
+ shutil.copytree(master_skill, target, dirs_exist_ok=True)
334
+ installed.append("Claude Code")
335
+
336
+ def install_cursor():
337
+ target = project / ".cursor" / "skills" / name
338
+ target.mkdir(parents=True, exist_ok=True)
339
+ shutil.copytree(master_skill, target, dirs_exist_ok=True)
340
+ installed.append("Cursor")
341
+
342
+ # Install
343
+ if tool:
344
+ tool = tool.lower()
345
+ if tool in ("copilot", "github", "all"):
346
+ install_copilot()
347
+ if tool in ("claude", "all"):
348
+ install_claude()
349
+ if tool in ("cursor", "all"):
350
+ install_cursor()
351
+ else:
352
+ detected = False
353
+ if (project / ".github").exists():
354
+ install_copilot()
355
+ detected = True
356
+ if (project / ".claude").exists():
357
+ install_claude()
358
+ detected = True
359
+ if (project / ".cursor").exists():
360
+ install_cursor()
361
+ detected = True
362
+ if not detected:
363
+ install_copilot()
364
+
365
+ # Track
366
+ proj_key = str(project)
367
+ if proj_key not in config.get("installed_projects", {}):
368
+ config["installed_projects"][proj_key] = []
369
+ if name not in config["installed_projects"][proj_key]:
370
+ config["installed_projects"][proj_key].append(name)
371
+ save_config(config)
372
+
373
+ typer.echo(f"βœ… Installed '{name}' in {project.name}/")
374
+ for loc in installed:
375
+ typer.echo(f" β†’ {loc}")
376
+
377
+
378
+ @app.command("list")
379
+ def list_skills():
380
+ """Show all your skills."""
381
+ config = load_config()
382
+ skills_path = Path(config["skills_path"])
383
+ skills = [f for f in skills_path.iterdir() if f.is_dir()]
384
+
385
+ if not skills:
386
+ typer.echo("πŸ“­ No skills yet! Create one: agentskill create my-rules")
387
+ return
388
+
389
+ typer.echo(f"\nπŸ“š Skills:\n")
390
+ for skill_dir in sorted(skills):
391
+ yaml_file = skill_dir / "skill.yaml"
392
+ if yaml_file.exists():
393
+ content = yaml_file.read_text()
394
+ lang = framework = ""
395
+ for line in content.split("\n"):
396
+ if line.startswith("language:"):
397
+ lang = line.split(":")[1].strip()
398
+ if line.startswith("framework:"):
399
+ framework = line.split(":")[1].strip()
400
+ typer.echo(f" β€’ {skill_dir.name} [{lang}/{framework}]")
401
+ else:
402
+ typer.echo(f" β€’ {skill_dir.name}")
403
+
404
+
405
+ @app.command()
406
+ def update(name: str):
407
+ """Update skill in all installed projects."""
408
+ config = load_config()
409
+ count = 0
410
+
411
+ for proj_path, skills in list(config.get("installed_projects", {}).items()):
412
+ if isinstance(skills, list) and name in skills and Path(proj_path).exists():
413
+ old_cwd = os.getcwd()
414
+ os.chdir(proj_path)
415
+ install(name)
416
+ os.chdir(old_cwd)
417
+ count += 1
418
+
419
+ if count == 0:
420
+ typer.echo(f"⚠️ '{name}' not installed anywhere.")
421
+ else:
422
+ typer.echo(f"βœ… Updated in {count} project(s)")
423
+
424
+
425
+ @app.command()
426
+ def show(name: str):
427
+ """Show skill details."""
428
+ skill_dir = get_skill_path(name)
429
+ if not skill_dir.exists():
430
+ typer.echo(f"❌ Skill '{name}' not found!")
431
+ raise typer.Exit(1)
432
+
433
+ typer.echo(f"\nπŸ“‹ {name}")
434
+ typer.echo(f"πŸ“ {skill_dir}\n")
435
+
436
+ skill_md = skill_dir / "SKILL.md"
437
+ if skill_md.exists():
438
+ lines = skill_md.read_text().split("\n")[:20]
439
+ typer.echo("\n".join(lines))
440
+
441
+
442
+ @app.command()
443
+ def edit(name: str):
444
+ """Open skill in editor."""
445
+ skill_dir = get_skill_path(name)
446
+ if not skill_dir.exists():
447
+ typer.echo(f"❌ Skill '{name}' not found!")
448
+ raise typer.Exit(1)
449
+
450
+ import subprocess
451
+ for editor in ["code", "cursor", "subl", "nano", "vim"]:
452
+ try:
453
+ subprocess.run([editor, str(skill_dir / "SKILL.md")], check=True)
454
+ return
455
+ except:
456
+ continue
457
+ typer.echo(f"πŸ“ Edit: {skill_dir / 'SKILL.md'}")
458
+
459
+
460
+ @app.command()
461
+ def delete(name: str, force: bool = typer.Option(False, "--force", "-f")):
462
+ """Delete a skill."""
463
+ skill_dir = get_skill_path(name)
464
+ if not skill_dir.exists():
465
+ typer.echo(f"❌ Skill '{name}' not found!")
466
+ raise typer.Exit(1)
467
+
468
+ if not force and not typer.confirm(f"Delete '{name}'?"):
469
+ raise typer.Exit()
470
+
471
+ shutil.rmtree(skill_dir)
472
+ typer.echo(f"πŸ—‘οΈ Deleted '{name}'")
473
+
474
+
475
+ @app.command()
476
+ def export(name: str, output: str = typer.Option(".", help="Output folder")):
477
+ """Export skill as zip."""
478
+ skill_dir = get_skill_path(name)
479
+ if not skill_dir.exists():
480
+ typer.echo(f"❌ Skill '{name}' not found!")
481
+ raise typer.Exit(1)
482
+
483
+ zip_path = Path(output).resolve() / f"{name}.skill.zip"
484
+ with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED) as zf:
485
+ for file in skill_dir.rglob("*"):
486
+ if file.is_file():
487
+ zf.write(file, file.relative_to(skill_dir.parent))
488
+ typer.echo(f"πŸ“¦ {zip_path}")
489
+
490
+
491
+ @app.command("import")
492
+ def import_skill(zip_path: str):
493
+ """Import skill from zip."""
494
+ config = load_config()
495
+ zip_file = Path(zip_path).resolve()
496
+ if not zip_file.exists():
497
+ typer.echo(f"❌ Not found: {zip_path}")
498
+ raise typer.Exit(1)
499
+
500
+ with zipfile.ZipFile(zip_file, "r") as zf:
501
+ zf.extractall(config["skills_path"])
502
+ typer.echo("βœ… Imported!")
503
+
504
+
505
+ @app.command()
506
+ def init():
507
+ """Initialize AI folders in current project."""
508
+ project = find_project_root()
509
+ (project / ".github" / "skills").mkdir(parents=True, exist_ok=True)
510
+ (project / ".github" / "instructions").mkdir(parents=True, exist_ok=True)
511
+ typer.echo(f"βœ… Created .github/ in {project.name}/")
512
+
513
+
514
+ @app.command()
515
+ def where():
516
+ """Show skills storage location."""
517
+ config = load_config()
518
+ typer.echo(f"πŸ“ {config['skills_path']}")
519
+
520
+
521
+ if __name__ == "__main__":
522
+ app()
@@ -0,0 +1,191 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentskill-cli
3
+ Version: 1.0.0
4
+ Summary: Universal AI Skill Manager for GitHub Copilot, Claude, Cursor
5
+ Author: Parth
6
+ License: MIT
7
+ Keywords: ai,copilot,claude,cursor,skills,cli
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Software Development
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: typer>=0.9.0
17
+
18
+ # AgentSkill πŸ› οΈ
19
+
20
+ **Universal AI Skill Manager** β€” Manage skills for GitHub Copilot, Claude Code, Cursor, and more.
21
+
22
+ ## Features
23
+
24
+ - βœ… **Zero Config**: No setup needed, just install and use
25
+ - βœ… **Multi-AI Support**: GitHub Copilot, Claude Code, Cursor
26
+ - βœ… **Any Language**: Python, JavaScript, Go, Rust, Dart, etc.
27
+ - βœ… **Framework Templates**: React, Django, FastAPI, Flutter, Gin, etc.
28
+ - βœ… **One Command Install**: Auto-detects AI tools in project
29
+ - βœ… **Sync Updates**: Update skill β†’ all projects sync automatically
30
+
31
+ ## Installation (One Time)
32
+
33
+ ```bash
34
+ cd /path/to/Agent_Skill
35
+ pip install -e .
36
+ ```
37
+
38
+ That's it! Now `agentskill` command works globally.
39
+
40
+ ## Quick Start
41
+
42
+ ```bash
43
+ # Create a skill (auto-stored in ~/.agentskill/skills/)
44
+ agentskill create react-rules -l javascript -f react
45
+
46
+ # Go to any project and install
47
+ cd /your/react-project
48
+ agentskill install react-rules
49
+
50
+ # Done! AI will follow your rules
51
+ ```
52
+
53
+ ## Commands
54
+
55
+ | Command | Description |
56
+ |---------|-------------|
57
+ | `create <name>` | Create new skill |
58
+ | `install <name>` | Install in current project |
59
+ | `list` | Show all skills |
60
+ | `show <name>` | View skill details |
61
+ | `edit <name>` | Open in editor |
62
+ | `update <name>` | Sync to all projects |
63
+ | `delete <name>` | Remove skill |
64
+ | `export <name>` | Export as zip |
65
+ | `import <zip>` | Import from zip |
66
+ | `init` | Create AI folders |
67
+ | `where` | Show storage location |
68
+
69
+ **Shortcut**: Use `ask` instead of `agentskill`
70
+
71
+ ## Creating Skills
72
+
73
+ ### Basic
74
+
75
+ ```bash
76
+ agentskill create my-rules
77
+ ```
78
+
79
+ ### With Language & Framework
80
+
81
+ ```bash
82
+ # React skill
83
+ agentskill create react-component -l javascript -f react
84
+
85
+ # Django skill
86
+ agentskill create django-api -l python -f django
87
+
88
+ # Flutter skill
89
+ agentskill create flutter-widget -l dart -f flutter
90
+
91
+ # Go API skill
92
+ agentskill create go-api -l go -f gin
93
+ ```
94
+
95
+ ### Supported Templates
96
+
97
+ | Language | Frameworks |
98
+ |----------|------------|
99
+ | Python | django, fastapi, flask |
100
+ | JavaScript | react, nextjs, node |
101
+ | Dart | flutter |
102
+ | Go | gin, fiber |
103
+ | Rust | actix, axum |
104
+
105
+ ## Installing Skills
106
+
107
+ ### Auto-detect (recommended)
108
+
109
+ ```bash
110
+ cd /path/to/project
111
+ agentskill install my-skill
112
+ ```
113
+
114
+ Auto-detects `.github/`, `.claude/`, `.cursor/` folders.
115
+
116
+ ### Specific Tool
117
+
118
+ ```bash
119
+ # GitHub Copilot only
120
+ agentskill install my-skill -t copilot
121
+
122
+ # Claude only
123
+ agentskill install my-skill -t claude
124
+
125
+ # All tools
126
+ agentskill install my-skill -t all
127
+ ```
128
+
129
+ ## Skill Structure
130
+
131
+ ```
132
+ my-skill/
133
+ β”œβ”€β”€ SKILL.md # Main instructions (Copilot format)
134
+ β”œβ”€β”€ skill.yaml # SkillForge metadata
135
+ β”œβ”€β”€ instructions.md # Legacy format
136
+ β”œβ”€β”€ scripts/ # Helper scripts
137
+ β”œβ”€β”€ references/ # Additional docs
138
+ └── assets/ # Templates, boilerplate
139
+ ```
140
+
141
+ ## Editing Skills
142
+
143
+ ```bash
144
+ # Open in editor (VS Code, Cursor, etc.)
145
+ agentskill edit my-skill
146
+
147
+ # Or show details first
148
+ agentskill show my-skill
149
+ ```
150
+
151
+ After editing, update all projects:
152
+ ```bash
153
+ agentskill update my-skill
154
+ ```
155
+
156
+ ## Sharing Skills
157
+
158
+ ```bash
159
+ # Export
160
+ agentskill export my-skill
161
+
162
+ # Import
163
+ agentskill import my-skill.skill.zip
164
+ ```
165
+
166
+ ## How It Works
167
+
168
+ 1. **Skills are stored** in `~/.agentskill/skills/` (automatic)
169
+ 2. **Install copies** skill to your project's AI folder
170
+ 3. **AI reads** the SKILL.md when you code
171
+
172
+ ```
173
+ ~/.agentskill/skills/ Your Projects
174
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
175
+ β”‚ react-rules/ β”‚ β”‚ my-react-app/ β”‚
176
+ β”‚ └── SKILL.md │──copy──▢│ └── .github/ β”‚
177
+ β”‚ django-api/ β”‚ β”‚ └── skillsβ”‚
178
+ β”‚ └── SKILL.md β”‚ β”‚ └── react-rules/
179
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
180
+ ```
181
+
182
+ ## Tips
183
+
184
+ - Keep SKILL.md under 500 lines
185
+ - Use `references/` for detailed docs
186
+ - Add code examples in `references/examples.md`
187
+ - Use specific trigger words in descriptions
188
+
189
+ ## License
190
+
191
+ MIT
@@ -0,0 +1,9 @@
1
+ README.md
2
+ agentskill.py
3
+ pyproject.toml
4
+ agentskill_cli.egg-info/PKG-INFO
5
+ agentskill_cli.egg-info/SOURCES.txt
6
+ agentskill_cli.egg-info/dependency_links.txt
7
+ agentskill_cli.egg-info/entry_points.txt
8
+ agentskill_cli.egg-info/requires.txt
9
+ agentskill_cli.egg-info/top_level.txt
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ agentskill = agentskill:app
3
+ ask = agentskill:app
@@ -0,0 +1 @@
1
+ typer>=0.9.0
@@ -0,0 +1 @@
1
+ agentskill
@@ -0,0 +1,33 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "agentskill-cli"
7
+ version = "1.0.0"
8
+ description = "Universal AI Skill Manager for GitHub Copilot, Claude, Cursor"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = {text = "MIT"}
12
+ authors = [
13
+ {name = "Parth"}
14
+ ]
15
+ keywords = ["ai", "copilot", "claude", "cursor", "skills", "cli"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Environment :: Console",
19
+ "Intended Audience :: Developers",
20
+ "License :: OSI Approved :: MIT License",
21
+ "Programming Language :: Python :: 3",
22
+ "Topic :: Software Development",
23
+ ]
24
+ dependencies = [
25
+ "typer>=0.9.0",
26
+ ]
27
+
28
+ [project.scripts]
29
+ agentskill = "agentskill:app"
30
+ ask = "agentskill:app"
31
+
32
+ [tool.setuptools]
33
+ py-modules = ["agentskill"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+