4-skill 0.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.
- package/LICENSE +21 -0
- package/README.md +36 -0
- package/bin/4-skill.js +8 -0
- package/package.json +39 -0
- package/skills/delivery-plan/SKILL.md +28 -0
- package/skills/repo-map/SKILL.md +26 -0
- package/skills/source-scout/SKILL.md +27 -0
- package/src/cli.js +33 -0
- package/src/install-skills.js +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Cheng Suk Huang
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# 4-skill
|
|
2
|
+
|
|
3
|
+
Three portable AI agent skills for VS Code Copilot Agent mode:
|
|
4
|
+
|
|
5
|
+
- `repo-map` creates an evidence-based repository map.
|
|
6
|
+
- `source-scout` creates a cited technical decision brief.
|
|
7
|
+
- `delivery-plan` turns a request into an implementation-ready plan.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
From a project folder:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx 4-skill@latest init
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
This creates:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
.github/skills/
|
|
21
|
+
├── repo-map/SKILL.md
|
|
22
|
+
├── source-scout/SKILL.md
|
|
23
|
+
└── delivery-plan/SKILL.md
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Existing skill files are preserved. Use `npx 4-skill@latest init --force` to replace them.
|
|
27
|
+
|
|
28
|
+
## Development
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install
|
|
32
|
+
npm test
|
|
33
|
+
npm run pack:check
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Publishing is configured in GitHub Actions on pushes to `main`. Configure npm Trusted Publishing for this repository before the first release.
|
package/bin/4-skill.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "4-skill",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Three practical AI agent skills for repository understanding, research, and delivery planning",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"4-skill": "bin/4-skill.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin",
|
|
11
|
+
"skills",
|
|
12
|
+
"src",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"test": "node --test",
|
|
18
|
+
"pack:check": "npm pack --dry-run"
|
|
19
|
+
},
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=18"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/SukHuang/4_skill.git"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://github.com/SukHuang/4_skill",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/SukHuang/4_skill/issues"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"ai",
|
|
33
|
+
"agents",
|
|
34
|
+
"skills",
|
|
35
|
+
"copilot",
|
|
36
|
+
"developer-tools"
|
|
37
|
+
],
|
|
38
|
+
"license": "MIT"
|
|
39
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: delivery-plan
|
|
3
|
+
description: Turn a product or engineering request into a small, verifiable implementation plan.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Delivery Plan
|
|
7
|
+
|
|
8
|
+
Use this skill when an idea, bug report, or feature request needs to become executable engineering work.
|
|
9
|
+
|
|
10
|
+
## Method
|
|
11
|
+
|
|
12
|
+
1. Restate the desired outcome and identify the user or system affected.
|
|
13
|
+
2. Inspect the relevant repository surfaces before proposing files or APIs.
|
|
14
|
+
3. Separate explicit requirements, assumptions, non-goals, and unresolved choices.
|
|
15
|
+
4. Break the work into ordered slices that can each be implemented and checked.
|
|
16
|
+
5. Write `DELIVERY_PLAN.md` unless another output path is requested.
|
|
17
|
+
|
|
18
|
+
## Include
|
|
19
|
+
|
|
20
|
+
- Problem statement and goals
|
|
21
|
+
- Assumptions and non-goals
|
|
22
|
+
- Proposed behavior and technical approach
|
|
23
|
+
- Ordered tasks with likely files or modules
|
|
24
|
+
- Acceptance criteria
|
|
25
|
+
- Focused test strategy
|
|
26
|
+
- Risks, rollback considerations, and open questions
|
|
27
|
+
|
|
28
|
+
Do not silently decide between materially different product behaviors. Make the smallest useful plan that still gives an implementer a clear validation path.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: repo-map
|
|
3
|
+
description: Build an evidence-based map of a software repository for onboarding or focused investigation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Repository Map
|
|
7
|
+
|
|
8
|
+
Use this skill when someone needs to understand an unfamiliar repository or locate the right implementation surface.
|
|
9
|
+
|
|
10
|
+
## Method
|
|
11
|
+
|
|
12
|
+
1. Inspect the top-level tree, manifests, configuration, documentation, entry points, and tests.
|
|
13
|
+
2. Follow one representative execution path from its entry point through the main modules.
|
|
14
|
+
3. Verify commands and claims against files; label anything that could not be confirmed.
|
|
15
|
+
4. Write `REPOSITORY_MAP.md` unless another output path is requested.
|
|
16
|
+
|
|
17
|
+
## Include
|
|
18
|
+
|
|
19
|
+
- Purpose and key user-facing flows
|
|
20
|
+
- Architecture and one concrete data or control-flow path
|
|
21
|
+
- Important directories and files
|
|
22
|
+
- Install, development, test, and build commands
|
|
23
|
+
- Configuration, external services, and environment variables
|
|
24
|
+
- Risks, unknowns, and useful next steps
|
|
25
|
+
|
|
26
|
+
Keep the result concise and operational. Never invent behavior, dependencies, or files.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: source-scout
|
|
3
|
+
description: Investigate a technical question using authoritative sources and produce a traceable decision brief.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Source Scout
|
|
7
|
+
|
|
8
|
+
Use this skill to compare tools, investigate a technical claim, or prepare a recommendation that depends on external evidence.
|
|
9
|
+
|
|
10
|
+
## Method
|
|
11
|
+
|
|
12
|
+
1. Define the decision, constraints, and questions that must be answered.
|
|
13
|
+
2. Start with user-provided links, official documentation, specifications, and primary sources.
|
|
14
|
+
3. Record the source for every material claim and distinguish facts from interpretation.
|
|
15
|
+
4. Prefer current sources; state the access date when available.
|
|
16
|
+
5. Write `DECISION_BRIEF.md` unless another output path is requested.
|
|
17
|
+
|
|
18
|
+
## Include
|
|
19
|
+
|
|
20
|
+
- Decision summary
|
|
21
|
+
- Findings grouped by question
|
|
22
|
+
- Comparison and trade-offs
|
|
23
|
+
- Recommendation tied to the stated constraints
|
|
24
|
+
- Sources with inline links
|
|
25
|
+
- Unresolved questions and verification steps
|
|
26
|
+
|
|
27
|
+
Do not imply that a source was consulted when it was not. Do not turn a weak source into certainty through confident wording.
|
package/src/cli.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { installSkills } from "./install-skills.js";
|
|
2
|
+
|
|
3
|
+
const HELP = `4-skill - install practical AI agent skills
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
4-skill init [--force]
|
|
7
|
+
|
|
8
|
+
Commands:
|
|
9
|
+
init [--force] Install the three skills in .github/skills
|
|
10
|
+
|
|
11
|
+
Installed skills:
|
|
12
|
+
repo-map Map a repository for onboarding or investigation
|
|
13
|
+
source-scout Research a technical decision with traceable sources
|
|
14
|
+
delivery-plan Turn a request into verifiable engineering work
|
|
15
|
+
|
|
16
|
+
Options:
|
|
17
|
+
--help Show this help
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
export async function run(args) {
|
|
21
|
+
const [command, ...options] = args;
|
|
22
|
+
|
|
23
|
+
if (!command || command === "--help" || command === "-h") {
|
|
24
|
+
console.log(HELP);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (command === "init") {
|
|
29
|
+
return installSkills({ force: options.includes("--force") });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
throw new Error(`Unknown command "${command}". Run "4-skill --help" for usage.`);
|
|
33
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { cp, mkdir, readdir, readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
5
|
+
const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
6
|
+
const sourceRoot = path.join(packageRoot, "skills");
|
|
7
|
+
|
|
8
|
+
export async function installSkills({ force = false } = {}) {
|
|
9
|
+
const targetRoot = path.join(process.cwd(), ".github", "skills");
|
|
10
|
+
const skillNames = await readdir(sourceRoot, { withFileTypes: true });
|
|
11
|
+
const installed = [];
|
|
12
|
+
|
|
13
|
+
for (const entry of skillNames) {
|
|
14
|
+
if (!entry.isDirectory()) continue;
|
|
15
|
+
|
|
16
|
+
const sourceFile = path.join(sourceRoot, entry.name, "SKILL.md");
|
|
17
|
+
const targetDirectory = path.join(targetRoot, entry.name);
|
|
18
|
+
const targetFile = path.join(targetDirectory, "SKILL.md");
|
|
19
|
+
|
|
20
|
+
if (!force) {
|
|
21
|
+
try {
|
|
22
|
+
await readFile(targetFile);
|
|
23
|
+
continue;
|
|
24
|
+
} catch (error) {
|
|
25
|
+
if (error.code !== "ENOENT") throw error;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
await mkdir(targetDirectory, { recursive: true });
|
|
30
|
+
await cp(sourceFile, targetFile, { force: true });
|
|
31
|
+
installed.push(entry.name);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (installed.length === 0) {
|
|
35
|
+
console.log("No skills installed. Existing files were preserved; use --force to replace them.");
|
|
36
|
+
} else {
|
|
37
|
+
console.log(`Installed ${installed.length} skill${installed.length === 1 ? "" : "s"}: ${installed.join(", ")}`);
|
|
38
|
+
}
|
|
39
|
+
}
|