@ianyian/myskills 0.1.0 → 0.2.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/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # @ianyian/myskills
2
2
 
3
- Three practical AI skills that turn a Node.js CLI into a small project assistant:
3
+ Three portable VS Code Agent Skills that turn an AI coding agent into a small project assistant:
4
4
 
5
- - **`repo-explorer`** understands a local repository and writes an architecture and onboarding guide.
6
- - **`research-brief`** turns a topic and optional URLs into a cited Markdown research brief.
5
+ - **`repo-explorer`** understands a local repository and creates an architecture and onboarding guide.
6
+ - **`research-brief`** researches a topic and creates a cited Markdown brief.
7
7
  - **`idea-to-execution`** converts an idea into an implementation plan with tasks and acceptance criteria.
8
8
 
9
9
  Repository: <https://github.com/ianyian/mySKILLs>
@@ -11,9 +11,9 @@ Repository: <https://github.com/ianyian/mySKILLs>
11
11
  ## Requirements
12
12
 
13
13
  - Node.js 18 or newer
14
- - An OpenAI-compatible API key
14
+ - VS Code with GitHub Copilot Agent mode, or another agent that supports `.github/skills/*/SKILL.md`
15
15
 
16
- The CLI uses the OpenAI-compatible Chat Completions API. It works with OpenAI by default and can be pointed at another compatible provider with `OPENAI_BASE_URL`.
16
+ The default workflow does not require an API key. VS Code Copilot supplies the model and executes the skills.
17
17
 
18
18
  ## Install and configure
19
19
 
@@ -29,50 +29,56 @@ Or install globally:
29
29
  npm install --global @ianyian/myskills
30
30
  ```
31
31
 
32
- Configure the model client:
32
+ Install the skills into the project you have open in VS Code:
33
33
 
34
34
  ```bash
35
- export OPENAI_API_KEY="your-api-key"
36
- # Optional:
37
- export OPENAI_MODEL="gpt-4o-mini"
38
- export OPENAI_BASE_URL="https://api.openai.com/v1"
35
+ npx @ianyian/myskills@latest init
39
36
  ```
40
37
 
41
- ## Examples
38
+ This creates:
42
39
 
43
- Analyze the current repository:
40
+ ```text
41
+ .github/skills/
42
+ ├── repo-explorer/SKILL.md
43
+ ├── research-brief/SKILL.md
44
+ └── idea-to-execution/SKILL.md
45
+ ```
46
+
47
+ Restart or reload the VS Code window if the agent does not discover the skills immediately. Use `--force` only when you want to replace existing skill files:
44
48
 
45
49
  ```bash
46
- npx @ianyian/myskills repo-explorer .
50
+ npx @ianyian/myskills@latest init --force
47
51
  ```
48
52
 
49
- This creates `PROJECT_OVERVIEW.md`. Choose another output path with `--output`:
53
+ ## Use the skills with VS Code Agent mode
54
+
55
+ Open the project in VS Code, start GitHub Copilot Chat in Agent mode, and ask naturally:
56
+
57
+ Analyze the current repository:
50
58
 
51
59
  ```bash
52
- npx @ianyian/myskills repo-explorer ./my-project --output docs/onboarding.md
60
+ Create a repository onboarding guide using the repo-explorer skill.
53
61
  ```
54
62
 
55
- Create a research brief:
63
+ This creates `PROJECT_OVERVIEW.md`. Other examples:
56
64
 
57
65
  ```bash
58
- npx @ianyian/myskills research-brief "Compare PostgreSQL and MongoDB"
66
+ Use the research-brief skill to compare PostgreSQL and MongoDB, with citations.
59
67
  ```
60
68
 
61
- Add source URLs. The skill fetches their text and asks the model to cite them:
62
-
63
69
  ```bash
64
- npx @ianyian/myskills research-brief \
65
- "Best practices for Node.js error handling" \
66
- --url https://nodejs.org/en/learn/getting-started/introduction-to-nodejs \
67
- --output docs/node-research.md
70
+ Use the idea-to-execution skill to plan dark mode for this web application.
68
71
  ```
69
72
 
70
- Turn a product idea into an execution plan:
73
+ The agent reads each `SKILL.md`, inspects the project or web sources as needed, and creates the requested artifact.
74
+
75
+ ## Optional standalone CLI mode
76
+
77
+ The original commands remain available for users who want this package to call an OpenAI-compatible model directly. This mode requires `OPENAI_API_KEY`:
71
78
 
72
79
  ```bash
73
- npx @ianyian/myskills idea-to-execution \
74
- "Add dark mode to my web application" \
75
- --output implementation-plan.md
80
+ export OPENAI_API_KEY="your-api-key"
81
+ npx @ianyian/myskills repo-explorer .
76
82
  ```
77
83
 
78
84
  ## Development
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ianyian/myskills",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Practical AI skills for repository analysis, research, and execution planning",
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,6 +8,7 @@
8
8
  },
9
9
  "files": [
10
10
  "bin",
11
+ "skills",
11
12
  "src",
12
13
  "README.md",
13
14
  "LICENSE"
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: idea-to-execution
3
+ description: Turn a product or engineering idea into an implementation-ready plan.
4
+ ---
5
+
6
+ # Idea to Execution
7
+
8
+ Use this skill when the user has a rough idea and wants an actionable engineering plan.
9
+
10
+ ## Workflow
11
+
12
+ 1. Restate the problem and intended outcome.
13
+ 2. Make assumptions explicit and identify non-goals.
14
+ 3. Inspect the repository when the idea relates to an existing codebase.
15
+ 4. Produce `implementation-plan.md` unless the user requests another output path.
16
+ 5. Include:
17
+ - Problem and goals
18
+ - User experience
19
+ - Proposed technical approach
20
+ - Ordered tasks with likely files or modules
21
+ - Acceptance criteria
22
+ - Testing strategy
23
+ - Risks and open questions
24
+
25
+ Keep tasks small enough to implement and verify independently. Do not silently make product decisions when multiple reasonable options exist.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: repo-explorer
3
+ description: Understand a repository and create a practical architecture and onboarding guide.
4
+ ---
5
+
6
+ # Repository Explorer
7
+
8
+ Use this skill when the user asks you to understand, document, or onboard someone to a repository.
9
+
10
+ ## Workflow
11
+
12
+ 1. Inspect the repository structure, package manifests, configuration, entry points, tests, and documentation.
13
+ 2. Trace the main execution or data flow. Prefer evidence from source code over assumptions.
14
+ 3. Identify the commands needed to install, run, test, and build the project.
15
+ 4. Write `PROJECT_OVERVIEW.md` unless the user requests another output path.
16
+ 5. Include:
17
+ - Executive summary
18
+ - Architecture and data flow
19
+ - Important directories and files
20
+ - Setup and development commands
21
+ - Dependencies and configuration
22
+ - Risks, unknowns, and recommended next steps
23
+
24
+ Do not invent behavior or claim that a file exists without inspecting it. Keep the guide concise enough to be useful during onboarding.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: research-brief
3
+ description: Research a topic using available web tools and produce a concise cited Markdown brief.
4
+ ---
5
+
6
+ # Research Brief
7
+
8
+ Use this skill when the user asks to compare technologies, investigate a topic, or summarize external information.
9
+
10
+ ## Workflow
11
+
12
+ 1. Clarify the scope and the decision the research should support.
13
+ 2. Prefer primary and authoritative sources. Use the user's URLs when supplied.
14
+ 3. Separate verified facts, expert recommendations, and interpretation.
15
+ 4. Produce `research-brief.md` unless the user requests another output path.
16
+ 5. Include:
17
+ - Executive summary
18
+ - Key findings
19
+ - Comparison and trade-offs where relevant
20
+ - Practical recommendation
21
+ - Sources with inline citations
22
+ - Open questions or claims requiring verification
23
+
24
+ Do not imply that a source was consulted if it was not. Include access dates when the agent's available tooling supports them.
package/src/cli.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { runRepoExplorer } from "./skills/repo-explorer.js";
2
2
  import { runResearchBrief } from "./skills/research-brief.js";
3
3
  import { runIdeaToExecution } from "./skills/idea-to-execution.js";
4
+ import { installSkills } from "./install-skills.js";
4
5
 
5
6
  const HELP = `@ianyian/myskills - practical AI skills for projects
6
7
 
@@ -11,6 +12,7 @@ Commands:
11
12
  repo-explorer [directory] Analyze a repository
12
13
  research-brief <topic> Create a research brief
13
14
  idea-to-execution <idea> Create an implementation plan
15
+ init [--force] Install VS Code Agent Skills in this project
14
16
 
15
17
  Options:
16
18
  --output <file> Output Markdown path
@@ -32,5 +34,6 @@ export async function run(args) {
32
34
  if (command === "repo-explorer") return runRepoExplorer(rest);
33
35
  if (command === "research-brief") return runResearchBrief(rest);
34
36
  if (command === "idea-to-execution") return runIdeaToExecution(rest);
37
+ if (command === "init") return installSkills({ force: rest.includes("--force") });
35
38
  throw new Error(`Unknown command "${command}". Run "myskills --help" for usage.`);
36
39
  }
@@ -0,0 +1,29 @@
1
+ import { access, cp, mkdir } 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
+ const skillNames = ["repo-explorer", "research-brief", "idea-to-execution"];
9
+
10
+ export async function installSkills({ force = false } = {}) {
11
+ const destinationRoot = path.resolve(".github", "skills");
12
+ await mkdir(destinationRoot, { recursive: true });
13
+
14
+ for (const skillName of skillNames) {
15
+ const source = path.join(sourceRoot, skillName);
16
+ const destination = path.join(destinationRoot, skillName);
17
+ if (!force) {
18
+ try {
19
+ await access(destination);
20
+ throw new Error(`${destination} already exists. Use --force to replace it.`);
21
+ } catch (error) {
22
+ if (error.code !== "ENOENT") throw error;
23
+ }
24
+ }
25
+ await cp(source, destination, { recursive: true, force });
26
+ }
27
+
28
+ console.log(`Installed ${skillNames.length} VS Code Agent Skills in ${destinationRoot}`);
29
+ }