@ianyian/myskills 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,78 +1,49 @@
1
1
  # @ianyian/myskills
2
2
 
3
- Three practical AI skills that turn a Node.js CLI into a small project assistant:
3
+ Portable AI skills for VS Code Copilot Agent mode:
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.
7
- - **`idea-to-execution`** converts an idea into an implementation plan with tasks and acceptance criteria.
5
+ - **repo-explorer** - creates a repository architecture and onboarding guide.
6
+ - **research-brief** - creates a concise research brief with citations.
7
+ - **idea-to-execution** - turns an idea into an implementation plan.
8
8
 
9
9
  Repository: <https://github.com/ianyian/mySKILLs>
10
10
 
11
- ## Requirements
11
+ ## Use in a project
12
12
 
13
- - Node.js 18 or newer
14
- - An OpenAI-compatible API key
13
+ Requirements: Node.js 18+ and VS Code with GitHub Copilot Agent mode.
15
14
 
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`.
17
-
18
- ## Install and configure
19
-
20
- Run without installing:
21
-
22
- ```bash
23
- npx @ianyian/myskills --help
24
- ```
25
-
26
- Or install globally:
27
-
28
- ```bash
29
- npm install --global @ianyian/myskills
30
- ```
31
-
32
- Configure the model client:
33
-
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"
39
- ```
40
-
41
- ## Examples
42
-
43
- Analyze the current repository:
15
+ From the project folder, run:
44
16
 
45
17
  ```bash
46
- npx @ianyian/myskills repo-explorer .
18
+ npx @ianyian/myskills@latest init
47
19
  ```
48
20
 
49
- This creates `PROJECT_OVERVIEW.md`. Choose another output path with `--output`:
21
+ This creates:
50
22
 
51
- ```bash
52
- npx @ianyian/myskills repo-explorer ./my-project --output docs/onboarding.md
23
+ ```text
24
+ .github/skills/
25
+ ├── repo-explorer/SKILL.md
26
+ ├── research-brief/SKILL.md
27
+ └── idea-to-execution/SKILL.md
53
28
  ```
54
29
 
55
- Create a research brief:
30
+ Then open Copilot Chat in Agent mode and ask:
56
31
 
57
- ```bash
58
- npx @ianyian/myskills research-brief "Compare PostgreSQL and MongoDB"
32
+ ```text
33
+ Use the repo-explorer skill to create an onboarding guide for this repository.
59
34
  ```
60
35
 
61
- Add source URLs. The skill fetches their text and asks the model to cite them:
36
+ The other skills can be used with requests such as:
62
37
 
63
- ```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
38
+ ```text
39
+ Use the research-brief skill to compare PostgreSQL and MongoDB, with citations.
40
+ Use the idea-to-execution skill to plan dark mode for this web application.
68
41
  ```
69
42
 
70
- Turn a product idea into an execution plan:
43
+ The agent creates the requested Markdown artifacts in your project. Use `--force` to replace existing skill files:
71
44
 
72
45
  ```bash
73
- npx @ianyian/myskills idea-to-execution \
74
- "Add dark mode to my web application" \
75
- --output implementation-plan.md
46
+ npx @ianyian/myskills@latest init --force
76
47
  ```
77
48
 
78
49
  ## Development
@@ -83,19 +54,16 @@ npm test
83
54
  npm pack --dry-run
84
55
  ```
85
56
 
86
- The package contains no runtime dependencies; it uses Node.js built-ins and `fetch`.
87
-
88
- ## Publish
89
-
90
- After logging in to npm, publish a new version:
57
+ ## Automated npm publishing
91
58
 
92
- ```bash
93
- npm login
94
- npm publish --access public
95
- ```
59
+ Publishing runs automatically after a pull request is merged into `main`.
96
60
 
97
- Every later publish needs a new version, for example `npm version patch && npm publish`.
61
+ 1. In npm package settings, configure a **Trusted Publisher** for GitHub Actions with owner `ianyian`, repository `mySKILLs`, workflow filename `publish.yml`, and no environment. The filename is case-sensitive and must be the filename only, not the `.github/workflows/` path.
62
+ 2. Merge a pull request into `main`.
63
+ 3. GitHub Actions runs `npm test`.
64
+ 4. If the version already exists on npm, the workflow increments the patch version.
65
+ 5. GitHub publishes the package with OIDC provenance, then commits the new version to `main`.
98
66
 
99
- ## Security and privacy
67
+ The workflow uses npm 11.5.1 for Trusted Publishing, ignores its own release commit, and creates one npm release per merge. Published npm versions are immutable. Manual releases require a version bump before `npm publish`.
100
68
 
101
- The CLI sends the repository excerpts or fetched source text to the configured model provider. Review your provider's data policy before using it with private code. API keys are read from environment variables and are never written to generated files.
69
+ The normal Agent Skills workflow does not require an API key. The package also retains an optional standalone CLI mode for OpenAI-compatible providers, which requires `OPENAI_API_KEY`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ianyian/myskills",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
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
+ }