@pratikpsl/agent-skills 0.9.0 → 1.1.0

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.
Files changed (94) hide show
  1. package/README.md +59 -99
  2. package/dist/bin/agent-skills.d.ts.map +1 -1
  3. package/dist/bin/agent-skills.js +0 -3
  4. package/dist/bin/agent-skills.js.map +1 -1
  5. package/dist/cli/index.js +41 -33
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/core/ide-map.d.ts +3 -9
  8. package/dist/core/ide-map.d.ts.map +1 -1
  9. package/dist/core/ide-map.js +16 -33
  10. package/dist/core/ide-map.js.map +1 -1
  11. package/dist/core/install-template.d.ts +21 -0
  12. package/dist/core/install-template.d.ts.map +1 -0
  13. package/dist/core/install-template.js +119 -0
  14. package/dist/core/install-template.js.map +1 -0
  15. package/dist/core/resolve-template.d.ts +4 -0
  16. package/dist/core/resolve-template.d.ts.map +1 -0
  17. package/dist/core/resolve-template.js +22 -0
  18. package/dist/core/resolve-template.js.map +1 -0
  19. package/package.json +2 -2
  20. package/templates/default/instructions.md +26 -28
  21. package/templates/dotnet/AgentSkills/agents/architect.agent.md +8 -54
  22. package/templates/dotnet/AgentSkills/agents/developer.agent.md +8 -83
  23. package/templates/dotnet/AgentSkills/skills/csharp-xunit/SKILL.md +32 -58
  24. package/templates/dotnet/AgentSkills/skills/dotnet-best-practices/SKILL.md +62 -153
  25. package/templates/dotnet/AgentSkills/skills/performance/SKILL.md +18 -0
  26. package/templates/react/AgentSkills/agents/developer.agent.md +23 -0
  27. package/templates/react/AgentSkills/skills/performance/SKILL.md +18 -0
  28. package/templates/react/AgentSkills/skills/react-typescript/SKILL.md +22 -0
  29. package/templates/react/AgentSkills/skills/testing/SKILL.md +17 -0
  30. package/templates/shared/AgentSkills/OPERATING.md +15 -0
  31. package/templates/shared/AgentSkills/agents/architect.agent.md +12 -0
  32. package/templates/shared/AgentSkills/agents/reviewer.agent.md +27 -0
  33. package/templates/shared/AgentSkills/skills/principles/SKILL.md +31 -0
  34. package/templates/shared/AgentSkills/skills/security/SKILL.md +18 -0
  35. package/templates/shared/AgentSkills/skills/standards/SKILL.md +27 -0
  36. package/templates/shared/entry-points/instructions.md +28 -0
  37. package/dist/cli/commands/add.d.ts +0 -3
  38. package/dist/cli/commands/add.d.ts.map +0 -1
  39. package/dist/cli/commands/add.js +0 -73
  40. package/dist/cli/commands/add.js.map +0 -1
  41. package/dist/cli/commands/dotnet-setup.d.ts +0 -5
  42. package/dist/cli/commands/dotnet-setup.d.ts.map +0 -1
  43. package/dist/cli/commands/dotnet-setup.js +0 -83
  44. package/dist/cli/commands/dotnet-setup.js.map +0 -1
  45. package/dist/cli/commands/init.d.ts +0 -3
  46. package/dist/cli/commands/init.d.ts.map +0 -1
  47. package/dist/cli/commands/init.js +0 -36
  48. package/dist/cli/commands/init.js.map +0 -1
  49. package/dist/cli/commands/list.d.ts +0 -3
  50. package/dist/cli/commands/list.d.ts.map +0 -1
  51. package/dist/cli/commands/list.js +0 -37
  52. package/dist/cli/commands/list.js.map +0 -1
  53. package/dist/cli/commands/setup.d.ts +0 -9
  54. package/dist/cli/commands/setup.d.ts.map +0 -1
  55. package/dist/cli/commands/setup.js +0 -77
  56. package/dist/cli/commands/setup.js.map +0 -1
  57. package/dist/core/copy-skills.d.ts +0 -30
  58. package/dist/core/copy-skills.d.ts.map +0 -1
  59. package/dist/core/copy-skills.js +0 -84
  60. package/dist/core/copy-skills.js.map +0 -1
  61. package/dist/core/load-pack.d.ts +0 -15
  62. package/dist/core/load-pack.d.ts.map +0 -1
  63. package/dist/core/load-pack.js +0 -35
  64. package/dist/core/load-pack.js.map +0 -1
  65. package/dist/core/manifest.d.ts +0 -21
  66. package/dist/core/manifest.d.ts.map +0 -1
  67. package/dist/core/manifest.js +0 -170
  68. package/dist/core/manifest.js.map +0 -1
  69. package/dist/core/resolve-pack.d.ts +0 -7
  70. package/dist/core/resolve-pack.d.ts.map +0 -1
  71. package/dist/core/resolve-pack.js +0 -59
  72. package/dist/core/resolve-pack.js.map +0 -1
  73. package/templates/dotnet/AgentSkills/OPERATING.md +0 -85
  74. package/templates/dotnet/AgentSkills/README.md +0 -64
  75. package/templates/dotnet/AgentSkills/agents/README.md +0 -16
  76. package/templates/dotnet/AgentSkills/entry-points/entry-point.md +0 -49
  77. package/templates/dotnet/AgentSkills/memory/index.md +0 -22
  78. package/templates/dotnet/AgentSkills/memory/lessons/api.md +0 -3
  79. package/templates/dotnet/AgentSkills/memory/lessons/auth.md +0 -3
  80. package/templates/dotnet/AgentSkills/memory/lessons/csharp.md +0 -3
  81. package/templates/dotnet/AgentSkills/memory/lessons/db.md +0 -3
  82. package/templates/dotnet/AgentSkills/memory/lessons/design.md +0 -3
  83. package/templates/dotnet/AgentSkills/memory/lessons/infra.md +0 -8
  84. package/templates/dotnet/AgentSkills/memory/lessons/mcp.md +0 -3
  85. package/templates/dotnet/AgentSkills/memory/lessons/testing.md +0 -3
  86. package/templates/dotnet/AgentSkills/memory/schema.md +0 -26
  87. package/templates/dotnet/AgentSkills/skills/INDEX.md +0 -21
  88. package/templates/dotnet/AgentSkills/skills/README.md +0 -14
  89. package/templates/dotnet/AgentSkills/skills/code-standards/SKILL.md +0 -122
  90. package/templates/dotnet/AgentSkills/skills/core/SKILL.md +0 -83
  91. package/templates/dotnet/AgentSkills/skills/design/SKILL.md +0 -108
  92. package/templates/dotnet/AgentSkills/skills/harness/SKILL.md +0 -62
  93. package/templates/dotnet/AgentSkills/skills/mcp_dotnet/SKILL.md +0 -54
  94. package/templates/shared/manifest.json +0 -57
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: performance
3
+ description: React rendering optimization, bundle code-splitting, and resource management.
4
+ ---
5
+
6
+ # React Performance
7
+
8
+ ## Render Optimization
9
+ - Eliminate unnecessary re-renders by colocating state locally rather than lifting state to global contexts.
10
+ - Compute derived state during render rather than synchronizing state copies inside effects.
11
+ - Use `useTransition` and `useDeferredValue` for non-blocking responsive UI updates during heavy renders.
12
+ - Measure render performance with React DevTools Profiler before applying `React.memo`, `useMemo`, or `useCallback`.
13
+
14
+ ## Bundle & Asset Efficiency
15
+ - Code-split route boundaries and heavy widget components using `React.lazy` and `Suspense`.
16
+ - Avoid heavy runtime utility libraries when modern ES2024+ native methods exist.
17
+ - Use `loading="lazy"` and explicit dimensions for images and media to prevent layout shift (CLS).
18
+ - Cancel pending network requests via `AbortController` when dependencies change or components unmount.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: react-typescript
3
+ description: React & TypeScript component typing, custom hook design, and type-safe state modeling.
4
+ ---
5
+
6
+ # React & TypeScript Guidance
7
+
8
+ ## Type Design & Component Contracts
9
+ - Define strict prop interfaces; avoid `any` or loose `Record<string, unknown>`.
10
+ - Use discriminated unions for distinct component states (e.g., `{ status: 'loading' } | { status: 'success'; data: T } | { status: 'error'; error: Error }`).
11
+ - Explicitly type event handlers and custom hook return values (use `as const` for tuple returns).
12
+
13
+ ## Custom Hook Guidelines
14
+ - Encapsulate reusable stateful logic into focused custom hooks prefixed with `use`.
15
+ - Keep hook parameter signatures clean (maximum 4 arguments; use options objects for complex configurations).
16
+ - Pass `AbortSignal` to asynchronous functions initiated inside hooks for safe cancellation.
17
+ - Return only stable handlers, derived state, and minimal state setters required by callers.
18
+
19
+ ## Form & Input Patterns
20
+ - Prefer controlled inputs for dynamic form validation; use native form actions where appropriate.
21
+ - Bind labels to inputs using `htmlFor` and `id` generated via `useId` for SSR safety.
22
+ - Handle disabled, aria-invalid, and error message associations (`aria-describedby`) for robust UX.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: testing
3
+ description: Component, hook, and integration testing with Vitest and React Testing Library.
4
+ ---
5
+
6
+ # Frontend Testing
7
+
8
+ ## Testing Principles
9
+ - Test user-visible behavior and interactions rather than internal component implementation details.
10
+ - Query elements using accessibility priorities: `getByRole` $\rightarrow$ `getByLabelText` $\rightarrow$ `getByText` $\rightarrow$ `getByTestId` (last resort).
11
+ - Use `@testing-library/user-event` over `fireEvent` to simulate realistic browser interactions.
12
+
13
+ ## Test Coverage & Scenarios
14
+ - Cover happy path user flows along with edge cases: loading skeletons, empty states, error boundaries, and invalid inputs.
15
+ - Isolate test suites; mock network boundaries cleanly (e.g. MSW or handler mocks).
16
+ - Test custom hooks using `renderHook` to verify state transitions and effect lifecycles.
17
+ - Keep tests deterministic, idempotent, and independent of execution order.
@@ -0,0 +1,15 @@
1
+ # Operating Contract
2
+
3
+ ## Workflow
4
+ 1. **Memory & Context**: Read `AgentSkills/memory/index.md` (create if missing); load only relevant domain lessons to avoid repeating past mistakes.
5
+ 2. **Role & Skill Discovery**: Load relevant role guidance from `AgentSkills/agents/` and skills from `AgentSkills/skills/`.
6
+ 3. **Pre-flight Inspection**: Inspect current codebase patterns, dependencies, and baseline build/test state.
7
+ 4. **Surgical Implementation**: Apply the minimal change required; adhere strictly to DRY, KISS, and YAGNI.
8
+ 5. **Verification**: Run the project's build and test commands (e.g. `npm test`, `dotnet test`, or project test suite) to verify happy paths and edge cases.
9
+ 6. **Learning Loop**: If a mistake was made and corrected or a durable rule discovered, record a concise lesson in `AgentSkills/memory/lessons/<domain>.md` and update `index.md`.
10
+
11
+ ## Completion Checklist
12
+ - [ ] Project builds cleanly with zero errors or warnings.
13
+ - [ ] Automated tests pass and cover failure paths and edge cases.
14
+ - [ ] No dead code, debug logging, unused imports, or temporary files remain.
15
+ - [ ] Relevant documentation or memory lessons updated if applicable.
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: architect
3
+ description: System design, module boundaries, data models, and architectural patterns.
4
+ ---
5
+
6
+ # Architect Guidance
7
+
8
+ ## Architectural Principles
9
+ - **Explicit Boundaries**: Define clear module boundaries, layer responsibilities, and dependency directions.
10
+ - **Simplicity First (YAGNI)**: Avoid speculative abstractions, premature generalizations, or unnecessary indirection.
11
+ - **Contracts Before Code**: Design data flow, relational schemas, DTOs, and API contracts explicitly before implementation.
12
+ - **Genuine Reusability**: Extract shared behavior only when it represents authentic, repeatable reuse across domains.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: reviewer
3
+ description: Code review, correctness, security, and standards verification.
4
+ ---
5
+
6
+ # Code Reviewer Guidance
7
+
8
+ Universal review guidance for AI agents and human reviewers across all stacks. Security, standards, and core principles remain invariant across frameworks.
9
+
10
+ ## Core References
11
+ - **Principles**: Adhere strictly to `AgentSkills/skills/principles/SKILL.md`.
12
+ - **Standards**: Adhere strictly to `AgentSkills/skills/standards/SKILL.md`.
13
+ - **Security**: Adhere strictly to `AgentSkills/skills/security/SKILL.md`.
14
+
15
+ ## Verification & Automated Checks
16
+ - [ ] **Clean Build**
17
+ - [ ] **Zero Lint Errors**
18
+ - [ ] **Tests Pass**
19
+ - [ ] **Test Robustness**
20
+
21
+ ## Standards & Skill Compliance
22
+ - [ ] **Principles**: `AgentSkills/skills/principles/SKILL.md`
23
+ - [ ] **Standards**: `AgentSkills/skills/standards/SKILL.md`
24
+ - [ ] **Security**: `AgentSkills/skills/security/SKILL.md`
25
+
26
+ ## Memory & Learning Loop
27
+ - [ ] **Agent Memory**: `AgentSkills/memory/index.md`
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: principles
3
+ description: Core software engineering principles, simplicity ladder, surgical changes, and standards.
4
+ ---
5
+
6
+ # Core Principles
7
+
8
+ Foundational software engineering principles and decision rules for AI agents and human contributors.
9
+
10
+ ## The Simplicity Ladder
11
+ Before writing any code, stop at the first rung that holds:
12
+
13
+ 1. **Does this need to be built at all?** (YAGNI)
14
+ 2. **Does it already exist in this codebase?** Reuse the helper, util, or pattern that is already here; do not rewrite it.
15
+ 3. **Does the standard library already do this?** Use it.
16
+ 4. **Does a native platform feature cover it?** Use it.
17
+ 5. **Does an already-installed dependency solve it?** Use it.
18
+ 6. **Can this be one line and simple?** Make it one.
19
+ 7. **Only then:** write the minimum code that works.
20
+
21
+ The ladder runs after you understand the problem, not instead of it: read the task and the code it touches, trace the real flow end-to-end, then climb.
22
+
23
+ ## Root Cause Over Symptom
24
+ Bug fix = root cause, not symptom. A bug report names a symptom. Grep every caller of the function you touch and fix the shared function once — one guard there is a smaller diff than one per caller, and patching only the path the ticket names leaves sibling callers still broken.
25
+
26
+ ## Foundational Principles
27
+ - **Think Before Coding**: Thoroughly understand requirements. If ambiguous, ask before guessing.
28
+ - **Surgical Changes**: Make the smallest change that satisfies the request; touch only what is explicitly required.
29
+ - **Simplicity First (KISS / YAGNI)**: Favor simple, clear, maintainable solutions over clever abstractions. Do not add unrequested features.
30
+ - **Zero-Error Builds**: Every change must compile cleanly and pass existing and newly added tests.
31
+ - **Standards & Security**: Adhere strictly to `AgentSkills/skills/standards/SKILL.md` and `AgentSkills/skills/security/SKILL.md`.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: security
3
+ description: Input validation, secret management, safe queries, and secure coding practices.
4
+ ---
5
+
6
+ # Security Guidelines
7
+
8
+ ## Secrets & Data Protection
9
+ - Never hardcode, commit, or log credentials, API keys, passwords, connection strings, tokens, or sensitive user PII.
10
+ - Treat environment variables and secure secret stores as the single source for sensitive configuration.
11
+
12
+ ## Input Validation & Sanitization
13
+ - Validate and sanitize all untrusted input at system, controller, and network boundaries.
14
+ - Reject invalid data early before passing it to internal business logic or data layers.
15
+
16
+ ## Safe Queries & Injection Defense
17
+ - Always use parameterized queries, ORM expressions, or safe query builders to prevent SQL, command, or script injection.
18
+ - Never concatenate raw user input into database queries, file paths, shell execution, or rendered HTML templates.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: standards
3
+ description: Core code quality, complexity limits, naming, and structural conventions.
4
+ ---
5
+
6
+ # Code Standards
7
+
8
+ ## Complexity & Structure
9
+ - **Function Size**: Maximum 50 lines per function.
10
+ - **Shallow Nesting**: Maximum 2 levels of nesting; prefer early returns to flatten control flow.
11
+ - **Clean Signatures**: Maximum 4 parameters per function; use an options object or record for complex signatures.
12
+
13
+ ## Design & Clean Code
14
+ - **SOLID / DRY / KISS**: Single-responsibility components; eliminate duplicated logic; prefer clear, direct implementations over speculative abstractions (YAGNI).
15
+ - **Naming & Clarity**: Use descriptive, domain-meaningful names for classes, functions, and variables.
16
+ - **No Magic Literals**: Replace magic numbers and strings with named constants or enums.
17
+ - **Contracts & Schemas**: Design explicit, human- and machine-readable data contracts, schemas, and self-describing APIs.
18
+ - **Intentional Comments**: Comment only where non-obvious rationale is required, never restate what the code itself expresses.
19
+
20
+ ## Concurrency & Safety
21
+ - **Async Safety**: Use idiomatic non-blocking `async`/`await`; ensure operations are free of race conditions and deadlocks.
22
+ - **Cancellation**: Implement cancellation tokens or abort controllers for async and I/O boundaries.
23
+
24
+ ## Errors & Logging
25
+ - **Idiomatic Errors**: Handle errors consistently with repository patterns; provide actionable context (what failed, where, identifiers).
26
+ - **No Silent Failures**: Never swallow exceptions silently.
27
+ - **Structured Logging**: Use structured logging entries rather than raw string concatenation.
@@ -0,0 +1,28 @@
1
+ # Agent & Developer Instructions
2
+
3
+ > Operating instructions and engineering guidelines for AI agents and human contributors.
4
+
5
+ ## Operating Contract
6
+ Always follow `AgentSkills/OPERATING.md` before making changes. Review relevant agent personas in `AgentSkills/agents/` and skills in `AgentSkills/skills/`.
7
+
8
+ ## Goal
9
+ Implement requested changes with production-quality code, preserving existing behavior and
10
+ minimizing the diff, following the project's own architecture, standards, and conventions.
11
+
12
+ ## Core Principles
13
+ - **Core Principles**: Adhere strictly to `AgentSkills/skills/principles/SKILL.md`.
14
+ - **Standards**: Adhere strictly to `AgentSkills/skills/standards/SKILL.md`.
15
+ - **Security**: Adhere strictly to `AgentSkills/skills/security/SKILL.md`.
16
+ - **Think Before Coding**: Thoroughly understand requirements. If ambiguous, ask before guessing.
17
+ - **Surgical Changes**: Make the smallest change that satisfies the request; touch only what is explicitly required.
18
+ - **Simplicity First (KISS / YAGNI)**: Favor simple, clear, maintainable solutions over clever abstractions. Do not add unrequested features.
19
+ - **Zero-Error Builds**: Every change must compile cleanly and pass existing and newly added tests.
20
+
21
+ ## Definition of Done
22
+ - Builds cleanly and all tests pass without errors or warnings.
23
+ - No debug code, dead code, unused imports, or temporary files left behind.
24
+ - Changes are minimal, focused, covered by tests, and easy to review.
25
+
26
+ ## Agent & Contributor Memory
27
+ - Read `AgentSkills/memory/index.md` at the start of every task (create if missing); load only relevant domain lessons.
28
+ - When a mistake is corrected or a durable rule discovered, record an actionable lesson in `AgentSkills/memory/lessons/<domain>.md` (create if missing) and update `index.md`.
@@ -1,3 +0,0 @@
1
- import type { Command } from "commander";
2
- export declare function addCommand(program: Command): void;
3
- //# sourceMappingURL=add.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/add.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgEjD"}
@@ -1,73 +0,0 @@
1
- // src/cli/commands/add.ts
2
- // `agent-skills add <pack> <skillName|--all>`
3
- //
4
- // Copies a single named skill (or all skills with --all) from a pack into the
5
- // current project's AgentSkills/ folder.
6
- //
7
- // This is the generic command. `dotnet-setup` is a convenience wrapper over this.
8
- import path from "path";
9
- import { loadPack } from "../../core/load-pack.js";
10
- import { copySkills, ensureAgentSkillsDir } from "../../core/copy-skills.js";
11
- export function addCommand(program) {
12
- program
13
- .command("add <pack> [skillName]")
14
- .description("Copy a skill (or all skills with --all) from a pack into this project")
15
- .option("--all", "Copy all skills from the pack", false)
16
- .option("--force", "Overwrite existing files", false)
17
- .option("--hardlink", "Hardlink shared files where possible", false)
18
- .option("--path <dir>", "Target project root (default: cwd)", process.cwd())
19
- .action((pack, skillName, options) => {
20
- if (!skillName && !options.all) {
21
- console.error("āœ— Specify a skill name or pass --all to copy every skill.");
22
- process.exit(1);
23
- }
24
- const targetDir = path.resolve(options.path);
25
- const { packDir, manifest } = loadPackOrExit(pack);
26
- let skillsToCopy;
27
- if (options.all) {
28
- skillsToCopy = manifest.skills;
29
- }
30
- else {
31
- const found = manifest.skills.find((s) => s.name === skillName);
32
- if (!found) {
33
- const available = manifest.skills.map((s) => s.name).join(", ");
34
- console.error(`āœ— Skill "${skillName}" not found in pack "${pack}".`);
35
- console.error(` Available: ${available}`);
36
- process.exit(1);
37
- }
38
- skillsToCopy = [found];
39
- }
40
- ensureAgentSkillsDir(targetDir);
41
- console.log(`\nCopying from ${manifest.name}@${manifest.version} → ${targetDir}\n`);
42
- const { written, skipped } = copySkills({
43
- skills: skillsToCopy,
44
- packDir,
45
- targetDir,
46
- force: options.force,
47
- hardlink: options.hardlink,
48
- });
49
- printSummary(written, skipped);
50
- if (written.length === 0 && skipped.length > 0) {
51
- // Everything was skipped — treat as a soft warning, not a hard error.
52
- process.exit(0);
53
- }
54
- });
55
- }
56
- function loadPackOrExit(pack) {
57
- try {
58
- return loadPack(pack);
59
- }
60
- catch (err) {
61
- const message = err instanceof Error ? err.message : String(err);
62
- console.error(`āœ— ${message}`);
63
- process.exit(1);
64
- }
65
- }
66
- function printSummary(written, skipped) {
67
- console.log("\n" + "─".repeat(50));
68
- console.log(`āœ” Done — ${written.length} written, ${skipped.length} skipped.`);
69
- if (skipped.length > 0) {
70
- console.log(" (Run with --force to overwrite skipped files.)");
71
- }
72
- }
73
- //# sourceMappingURL=add.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add.js","sourceRoot":"","sources":["../../../src/cli/commands/add.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,8CAA8C;AAC9C,EAAE;AACF,8EAA8E;AAC9E,yCAAyC;AACzC,EAAE;AACF,kFAAkF;AAElF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAG7E,MAAM,UAAU,UAAU,CAAC,OAAgB;IACzC,OAAO;SACJ,OAAO,CAAC,wBAAwB,CAAC;SACjC,WAAW,CACV,uEAAuE,CACxE;SACA,MAA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C;IACnC,OAAO,CAAC,GAAG,CAAC,YAAY,OAAO,CAAC,MAAM,aAAa,OAAO,CAAC,MAAM,WAAW,CAAC,CAAC;IAC9E,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC;IAClE,CAAC;AACH,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { Command } from "commander";
2
- import { filterSkillsForIde } from "../../core/ide-map.js";
3
- export { filterSkillsForIde };
4
- export declare function dotnetSetupCommand(program: Command): void;
5
- //# sourceMappingURL=dotnet-setup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dotnet-setup.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/dotnet-setup.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,OAAO,EAAE,kBAAkB,EAAmB,MAAM,uBAAuB,CAAC;AAK5E,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoEzD"}
@@ -1,83 +0,0 @@
1
- // src/cli/commands/dotnet-setup.ts
2
- // `agent-skills dotnet-setup [ide]`
3
- //
4
- // Convenience command equivalent to:
5
- // agent-skills add @pratikpsl/agent-skills-dotnet --all
6
- //
7
- // When an optional [ide] positional argument is supplied (cursor | claude |
8
- // codex | copilot | antigravity), only that IDE's entry-point file is written
9
- // together with all shared AgentSkills files. All other entry-point files are
10
- // skipped.
11
- //
12
- // Without [ide], all skills including every entry-point are copied (original
13
- // behaviour — no breaking change).
14
- import path from "path";
15
- import { loadPack } from "../../core/load-pack.js";
16
- import { copySkills, ensureAgentSkillsDir } from "../../core/copy-skills.js";
17
- import { filterSkillsForIde, VALID_IDE_NAMES } from "../../core/ide-map.js";
18
- const DOTNET_PACK = "dotnet";
19
- export { filterSkillsForIde };
20
- export function dotnetSetupCommand(program) {
21
- program
22
- .command("dotnet-setup")
23
- .description(`Install the full .NET/C# agent skill set (shortcut for: add ${DOTNET_PACK} --all).\n` +
24
- ` Optionally pass an IDE name to install only that IDE's entry-point:\n` +
25
- ` ${VALID_IDE_NAMES}`)
26
- .argument("[ide]", `IDE entry-point to install (${VALID_IDE_NAMES}). Omit to install all.`)
27
- .option("--force", "Overwrite existing files", false)
28
- .option("--hardlink", "Hardlink shared files where possible", false)
29
- .option("--path <dir>", "Target project root (default: cwd)", process.cwd())
30
- .action((ide, options) => {
31
- const targetDir = path.resolve(options.path);
32
- if (ide !== undefined) {
33
- console.log(`\nšŸ”§ Setting up .NET agent skills [${ide}] in: ${targetDir}\n`);
34
- }
35
- else {
36
- console.log(`\nšŸ”§ Setting up .NET agent skills in: ${targetDir}\n`);
37
- }
38
- const { packDir, manifest } = loadPackOrExit(DOTNET_PACK);
39
- let skills;
40
- if (ide !== undefined) {
41
- try {
42
- skills = filterSkillsForIde(manifest.skills, ide);
43
- }
44
- catch (err) {
45
- const message = err instanceof Error ? err.message : String(err);
46
- console.error(`āœ— ${message}`);
47
- process.exit(1);
48
- }
49
- }
50
- else {
51
- skills = manifest.skills;
52
- }
53
- ensureAgentSkillsDir(targetDir);
54
- console.log(`Copying from ${manifest.name}@${manifest.version}\n`);
55
- const { written, skipped } = copySkills({
56
- skills,
57
- packDir,
58
- targetDir,
59
- force: options.force,
60
- hardlink: options.hardlink,
61
- });
62
- console.log("\n" + "─".repeat(50));
63
- console.log(`āœ” .NET skills installed — ${written.length} written, ${skipped.length} skipped.`);
64
- if (skipped.length > 0) {
65
- console.log(" (Run with --force to overwrite skipped files.)");
66
- }
67
- if (written.length === 0 && skipped.length === 0) {
68
- console.error("\nāœ— No skills were copied. Check that the pack contains skill entries.");
69
- process.exit(1);
70
- }
71
- });
72
- }
73
- function loadPackOrExit(pack) {
74
- try {
75
- return loadPack(pack);
76
- }
77
- catch (err) {
78
- const message = err instanceof Error ? err.message : String(err);
79
- console.error(`āœ— ${message}`);
80
- process.exit(1);
81
- }
82
- }
83
- //# sourceMappingURL=dotnet-setup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dotnet-setup.js","sourceRoot":"","sources":["../../../src/cli/commands/dotnet-setup.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,oCAAoC;AACpC,EAAE;AACF,qCAAqC;AACrC,0DAA0D;AAC1D,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,8EAA8E;AAC9E,WAAW;AACX,EAAE;AACF,6EAA6E;AAC7E,mCAAmC;AAEnC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG5E,MAAM,WAAW,GAAG,QAAQ,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B,MAAM,UAAU,kBAAkB,CAAC,OAAgB;IACjD,OAAO;SACJ,OAAO,CAAC,cAAc,CAAC;SACvB,WAAW,CACV,+DAA+D,WAAW,YAAY;QACpF,yEAAyE;QACzE,KAAK,eAAe,EAAE,CACzB;SACA,QAAQ,CACP,OAAO,EACP,+BAA+B,eAAe,yBAAyB,CACxE;SACA,MAAM,CAAC,SAAS,EAAE,0BAA0B,EAAE,KAAK,CAAC;SACpD,MAAM,CAAC,YAAY,EAAE,sCAAsC,EAAE,KAAK,CAAC;SACnE,MAAM,CAAC,cAAc,EAAE,oCAAoC,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;SAC3E,MAAM,CAAC,CAAC,GAAuB,EAAE,OAA4D,EAAE,EAAE;QAChG,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAE7C,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YACtB,OA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,CAAC,MAAM,aAAa,OAAO,CAAC,MAAM,WAAW,CAClF,CAAC;QAEF,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,OAAO,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC;QAClE,CAAC;QAED,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACjD,OAAO,CAAC,KAAK,CACX,wEAAwE,CACzE,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,cAAc,CAAC,IAAY;IAClC,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,OAAO,CAAC,KAAK,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC;QAC9B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { Command } from "commander";
2
- export declare function initCommand(program: Command): void;
3
- //# sourceMappingURL=init.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsClD"}
@@ -1,36 +0,0 @@
1
- // src/cli/commands/init.ts
2
- // `agent-skills init`
3
- //
4
- // Scaffolds an empty AgentSkills/ folder + index.json in the current project
5
- // if one doesn't exist yet. Safe to run multiple times (idempotent).
6
- import { existsSync, mkdirSync, writeFileSync } from "fs";
7
- import path from "path";
8
- export function initCommand(program) {
9
- program
10
- .command("init")
11
- .description("Scaffold an empty AgentSkills/ folder in the current project")
12
- .option("--path <dir>", "Target project root (default: cwd)", process.cwd())
13
- .option("--force", "Overwrite existing files", false)
14
- .action((options) => {
15
- const targetDir = path.resolve(options.path);
16
- const agentSkillsDir = path.join(targetDir, "AgentSkills");
17
- if (existsSync(agentSkillsDir) && !options.force) {
18
- console.log(`AgentSkills/ already exists at ${agentSkillsDir}`);
19
- console.log("Use --force to reinitialize.");
20
- process.exit(0);
21
- }
22
- mkdirSync(agentSkillsDir, { recursive: true });
23
- console.log(`āœ“ Created ${agentSkillsDir}`);
24
- const indexPath = path.join(agentSkillsDir, "index.json");
25
- if (!existsSync(indexPath) || options.force) {
26
- const indexContent = {
27
- skills: [],
28
- _comment: "Add skills via `agent-skills add <pack> <skillName>` or `agent-skills dotnet-setup`",
29
- };
30
- writeFileSync(indexPath, JSON.stringify(indexContent, null, 2) + "\n", "utf8");
31
- console.log(`āœ“ Created ${indexPath}`);
32
- }
33
- console.log("\nāœ” AgentSkills initialized. Run `agent-skills dotnet-setup` to add .NET skills.");
34
- });
35
- }
36
- //# sourceMappingURL=init.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,sBAAsB;AACtB,EAAE;AACF,6EAA6E;AAC7E,qEAAqE;AAErE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC1D,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,8DAA8D,CAAC;SAC3E,MAAM,CAAC,cAAc,EAAE,oCAAoC,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;S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3
- //# sourceMappingURL=list.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/list.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA+BlD"}
@@ -1,37 +0,0 @@
1
- // src/cli/commands/list.ts
2
- // `agent-skills list [pack]`
3
- //
4
- // Lists available skills in an installed or available pack.
5
- // When no pack is specified, lists all packs the CLI knows about.
6
- import { resolvePack } from "../../core/resolve-pack.js";
7
- import { readManifest } from "../../core/manifest.js";
8
- export function listCommand(program) {
9
- program
10
- .command("list [pack]")
11
- .description("List available skills in a pack (default: all known packs)")
12
- .action((pack) => {
13
- const packsToList = pack
14
- ? [pack]
15
- : ["default", "dotnet"];
16
- let exitCode = 0;
17
- for (const packName of packsToList) {
18
- try {
19
- const packDir = resolvePack(packName);
20
- const manifest = readManifest(packDir);
21
- console.log(`\nšŸ“¦ ${manifest.name}@${manifest.version}`);
22
- console.log("─".repeat(50));
23
- for (const skill of manifest.skills) {
24
- console.log(` • ${skill.name.padEnd(28)} ${skill.description}`);
25
- }
26
- }
27
- catch (err) {
28
- const message = err instanceof Error ? err.message : String(err);
29
- console.error(`\nāœ— Could not list pack "${packName}": ${message}`);
30
- exitCode = 1;
31
- }
32
- }
33
- if (exitCode !== 0)
34
- process.exit(exitCode);
35
- });
36
- }
37
- //# sourceMappingURL=list.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/cli/commands/list.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,6BAA6B;AAC7B,EAAE;AACF,4DAA4D;AAC5D,kEAAkE;AAGlE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,MAAM,UAAU,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C,CAAC;IAC7C,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { Command } from "commander";
2
- export interface SetupOptions {
3
- force?: boolean;
4
- path?: string;
5
- hardlink?: boolean;
6
- }
7
- export declare function runSetup(ide: string | undefined, options?: SetupOptions): void;
8
- export declare function setupCommand(program: Command): void;
9
- //# sourceMappingURL=setup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/setup.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQzC,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,QAAQ,CACtB,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,OAAO,GAAE,YAAiB,GACzB,IAAI,CAmCN;AAsBD,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoBnD"}
@@ -1,77 +0,0 @@
1
- // src/cli/commands/setup.ts
2
- // `agent-skills [ide]` or `agent-skills setup [ide]`
3
- //
4
- // Scaffolds the single-file coding agent instruction template.
5
- // Supports cross-OS hardlinking (Windows, Linux, macOS) so all
6
- // IDE entry-points share one single file.
7
- import path from "path";
8
- import { loadPack } from "../../core/load-pack.js";
9
- import { copySkills } from "../../core/copy-skills.js";
10
- import { filterSkillsForIde, VALID_IDE_NAMES } from "../../core/ide-map.js";
11
- const DEFAULT_PACK = "default";
12
- export function runSetup(ide, options = {}) {
13
- const targetDir = path.resolve(options.path ?? process.cwd());
14
- const force = options.force ?? false;
15
- const hardlink = options.hardlink ?? true;
16
- const targetMsg = ide ? ` [${ide}]` : " (all IDE entry points)";
17
- console.log(`\nšŸ”§ Setting up agent instructions${targetMsg} in: ${targetDir}\n`);
18
- const { packDir, manifest } = loadPackOrExit(DEFAULT_PACK);
19
- let skills;
20
- try {
21
- skills = filterSkillsForIde(manifest.skills, ide);
22
- }
23
- catch (err) {
24
- const message = err instanceof Error ? err.message : String(err);
25
- console.error(`āœ— ${message}`);
26
- process.exit(1);
27
- }
28
- console.log(`Setting up from ${manifest.name}@${manifest.version}`);
29
- if (hardlink) {
30
- console.log("Cross-OS hardlinking enabled — all IDE entry points share one file.\n");
31
- }
32
- else {
33
- console.log();
34
- }
35
- const { written, skipped } = copySkills({
36
- skills,
37
- packDir,
38
- targetDir,
39
- force,
40
- hardlink,
41
- });
42
- printSummary(written, skipped);
43
- }
44
- function printSummary(written, skipped) {
45
- console.log("\n" + "─".repeat(50));
46
- console.log(`āœ” Instructions installed — ${written.length} written, ${skipped.length} skipped.`);
47
- if (skipped.length > 0) {
48
- console.log(" (Run with --force to overwrite skipped files.)");
49
- }
50
- }
51
- function loadPackOrExit(pack) {
52
- try {
53
- return loadPack(pack);
54
- }
55
- catch (err) {
56
- const message = err instanceof Error ? err.message : String(err);
57
- console.error(`āœ— ${message}`);
58
- process.exit(1);
59
- }
60
- }
61
- export function setupCommand(program) {
62
- program
63
- .command("setup")
64
- .description(`Install single-file agent instructions with cross-OS hardlinks.\n Available IDEs: ${VALID_IDE_NAMES}`)
65
- .argument("[ide]", `IDE entry-point to install (${VALID_IDE_NAMES}). Omit to install all.`)
66
- .option("--force", "Overwrite existing files", false)
67
- .option("--no-hardlink", "Copy separate files instead of hardlinking")
68
- .option("--path <dir>", "Target project root (default: cwd)", process.cwd())
69
- .action((ide, options) => {
70
- runSetup(ide, {
71
- force: options.force,
72
- path: options.path,
73
- hardlink: options.hardlink ?? true,
74
- });
75
- });
76
- }
77
- //# sourceMappingURL=setup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/cli/commands/setup.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,qDAAqD;AACrD,EAAE;AACF,+DAA+D;AAC/D,+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