@skilly-hand/skilly-hand 0.15.0 → 0.16.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/CHANGELOG.md CHANGED
@@ -16,6 +16,37 @@ All notable changes to this project are documented in this file.
16
16
  ### Removed
17
17
  - _None._
18
18
 
19
+ ## [0.16.0] - 2026-04-07
20
+ [View on npm](https://www.npmjs.com/package/@skilly-hand/skilly-hand/v/0.16.0)
21
+
22
+ ### Added
23
+ - _None._
24
+
25
+ ### Changed
26
+ - _None._
27
+
28
+ ### Fixed
29
+ - Added missing `output-optimizer` and `project-security` to the README catalog list.
30
+
31
+ ### Removed
32
+ - _None._
33
+
34
+ ## [0.15.1] - 2026-04-07
35
+ [View on npm](https://www.npmjs.com/package/@skilly-hand/skilly-hand/v/0.15.1)
36
+
37
+ ### Added
38
+ - Added portable skill `output-optimizer` for compact interpreter modes that minimize response verbosity while preserving clarity and correctness.
39
+ - Added portable skill `project-security` for scanning and enforcing security gates on commit, push, and publish workflows across GitHub, GitLab, npm, pnpm, yarn, and generic CI.
40
+
41
+ ### Changed
42
+ - _None._
43
+
44
+ ### Fixed
45
+ - _None._
46
+
47
+ ### Removed
48
+ - _None._
49
+
19
50
  ## [0.15.0] - 2026-04-05
20
51
  [View on npm](https://www.npmjs.com/package/@skilly-hand/skilly-hand/v/0.15.0)
21
52
 
@@ -41,7 +72,7 @@ All notable changes to this project are documented in this file.
41
72
 
42
73
  - Removed "Clarification-First Planning Workflow" from `AGENTS.md` (superseded by refined workflows)
43
74
 
44
- ## [0.14.0] - 2026-04-06
75
+ ## [0.14.0] - 2026-04-05
45
76
  [View on npm](https://www.npmjs.com/package/@skilly-hand/skilly-hand/v/0.14.0)
46
77
 
47
78
  ### Added
@@ -73,6 +104,8 @@ All notable changes to this project are documented in this file.
73
104
 
74
105
  ### Removed
75
106
  - _None._
107
+
108
+ ## [0.12.0] - 2026-04-05
76
109
  [View on npm](https://www.npmjs.com/package/@skilly-hand/skilly-hand/v/0.12.0)
77
110
 
78
111
  ### Added
package/README.md CHANGED
@@ -73,9 +73,11 @@ The catalog currently includes:
73
73
  - `angular-guidelines`
74
74
  - `figma-mcp-0to1`
75
75
  - `frontend-design`
76
+ - `output-optimizer`
77
+ - `project-security`
76
78
  - `project-teacher`
77
- - `review-rangers`
78
79
  - `react-guidelines`
80
+ - `review-rangers`
79
81
  - `skill-creator`
80
82
  - `spec-driven-development`
81
83
  - `test-driven-development`
package/catalog/README.md CHANGED
@@ -8,8 +8,10 @@ Published portable skills consumed by the `skilly-hand` CLI.
8
8
  | `agents-root-orchestrator` | Author root AGENTS.md as a Where/What/When orchestrator that routes tasks and skill invocation clearly. | core, workflow, orchestration | all |
9
9
  | `angular-guidelines` | Guide Angular code generation and review using latest stable Angular verification and modern framework best practices. | angular, frontend, workflow, best-practices | all |
10
10
  | `figma-mcp-0to1` | Guide users from Figma MCP installation and authentication through first canvas creation, with function-level tool coverage and operational recovery patterns. | figma, mcp, workflow, design | all |
11
- | `frontend-design` | Project-aware frontend design skill that detects the existing tech stack, UI libraries, CSS variables, and design tokens before proposing any UI work. | frontend, design, workflow, ui | all |
12
- | `project-teacher` | Scan the active project and teach any concept, code path, or decision using verified information, interactive questions, and simple explanations. | core, workflow, education | all |
11
+ | `frontend-design` | Project-aware frontend design skill that detects the existing tech stack, UI libraries, CSS variables, and design tokens before proposing any UI work. Supports greenfield projects via DESIGN.md context setup, and includes post-generation motion and visual refinement phases. | frontend, design, workflow, ui, motion, greenfield | all |
12
+ | `output-optimizer` | Optimize output token consumption through compact interpreter modes with controlled expansion when complexity, ambiguity, or risk requires more detail. Trigger: minimizing response verbosity while preserving clarity and correctness. | core, workflow, efficiency, communication | all |
13
+ | `project-security` | Scan project configuration and release surfaces for leak and security risks, and enforce security gates on commit, push, and publish workflows across GitHub, GitLab, npm, pnpm, yarn, and generic CI. Trigger: validating repository security posture, preventing secret leaks, or hardening delivery pipelines. | security, workflow, quality, core | all |
14
+ | `project-teacher` | Scan the active project and teach any concept, code path, or decision using verified information, interactive questions, and simple explanations. Trigger: user asks to explain, understand, clarify, or learn about anything in the project or codebase. | core, workflow, education | all |
13
15
  | `react-guidelines` | Guide React code generation and review using latest stable React verification and modern framework best practices. | react, frontend, workflow, best-practices | all |
14
16
  | `review-rangers` | Review code, decisions, and artifacts through a multi-perspective committee and a domain expert safety guard, then synthesize a structured verdict. | core, workflow, review, quality | all |
15
17
  | `skill-creator` | Create and standardize AI skills with reusable structure, metadata rules, and templates. | core, workflow, authoring | all |
@@ -4,6 +4,8 @@
4
4
  "angular-guidelines",
5
5
  "figma-mcp-0to1",
6
6
  "frontend-design",
7
+ "output-optimizer",
8
+ "project-security",
7
9
  "project-teacher",
8
10
  "react-guidelines",
9
11
  "review-rangers",
@@ -0,0 +1,159 @@
1
+ # Output Optimizer Guide
2
+
3
+ ## When to Use
4
+
5
+ Use this skill when:
6
+
7
+ - You want compact responses to reduce output token usage.
8
+ - You need deterministic output formats for repeated workflows.
9
+ - You need concise communication without losing core clarity.
10
+ - You want controlled detail expansion only when risk or ambiguity requires it.
11
+
12
+ Do not use this skill for:
13
+
14
+ - Cases where the user explicitly asks for long-form teaching or narrative detail.
15
+ - Tasks that require extensive legal, medical, or compliance explanation by default.
16
+ - Situations where a fixed external output schema already overrides style choices.
17
+
18
+ ---
19
+
20
+ ## Critical Patterns
21
+
22
+ ### Pattern 1: Activation and Precedence
23
+
24
+ Apply modes in this order:
25
+
26
+ 1. If user writes `mode: <name>`, use that mode.
27
+ 2. If no explicit mode, infer from phrasing:
28
+ - "keywords only" -> `machine`
29
+ - "yes or no" / "binary" -> `binary-decision`
30
+ - "json" / "structured output" -> `json-compact`
31
+ - "step by step, concise" -> `step-brief`
32
+ - "command style" / "minimal commands" -> `neandertal`
33
+ - "toon format" -> `toon`
34
+ 3. If no strong signal, default to `step-brief` for human-readable compact output.
35
+
36
+ Explicit mode always wins over inferred mode.
37
+
38
+ ### Pattern 2: Mode Contracts
39
+
40
+ | Mode | Contract | Token Profile |
41
+ | --- | --- | --- |
42
+ | `neandertal` | Imperative command-like short phrases, no filler, minimal connectors. | Lowest human-readable |
43
+ | `machine` | Keywords only, grouped by labels, no prose sentences. | Ultra-low |
44
+ | `step-brief` | Numbered steps, each step max 3-4 short phrases. | Low with clarity |
45
+ | `toon` | Exactly 4 blocks: `Title`, `Objective`, `Output`, `Next`. | Low and stable |
46
+ | `json-compact` | Minimal stable JSON keys and short scalar values. | Low + parseable |
47
+ | `binary-decision` | `yes` or `no` plus one short reason. | Ultra-low for triage |
48
+
49
+ ### Pattern 3: Complexity + Confidence Guard
50
+
51
+ Default to compact output. Expand only when:
52
+
53
+ 1. Task complexity is moderate/high and concise output may cause mistakes.
54
+ 2. Requirements are ambiguous and short output cannot preserve correctness.
55
+ 3. Risk is elevated (security, production impact, irreversible operations).
56
+ 4. User explicitly asks for more detail.
57
+
58
+ When expanding, keep structure compact and scoped to the needed clarification.
59
+
60
+ ### Pattern 4: Compression Rules
61
+
62
+ Always prefer:
63
+
64
+ - Specific nouns over long explanations.
65
+ - One-pass direct answer over repeated restatement.
66
+ - Bounded lists over paragraphs.
67
+ - Deterministic templates where possible.
68
+
69
+ Avoid:
70
+
71
+ - Polite filler and redundant transitions.
72
+ - Repeating the prompt unless needed for disambiguation.
73
+ - Verbose caveats when risk is low.
74
+
75
+ ---
76
+
77
+ ## Decision Tree
78
+
79
+ ```text
80
+ User provided `mode: <name>`? -> Use explicit mode
81
+ No explicit mode, strong phrasing signal? -> Infer mode from signal
82
+ No explicit mode and no signal? -> step-brief
83
+ Task complexity/ambiguity/risk is high? -> Expand within selected mode
84
+ User asks for detail/clarification? -> Expand within selected mode
85
+ Otherwise -> Keep compact output
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Output Examples
91
+
92
+ ### Example 1: `neandertal`
93
+
94
+ ```text
95
+ Check logs. Find error. Patch file. Run tests. Report result.
96
+ ```
97
+
98
+ ### Example 2: `machine`
99
+
100
+ ```text
101
+ status:blocked
102
+ cause:missing-env
103
+ action:set-token,retry
104
+ ```
105
+
106
+ ### Example 3: `step-brief`
107
+
108
+ ```text
109
+ 1. Open config file. Find auth block. Confirm token key.
110
+ 2. Add missing key. Save file. Re-run command.
111
+ 3. Verify success output. Capture result. Share summary.
112
+ ```
113
+
114
+ ### Example 4: `toon`
115
+
116
+ ```text
117
+ Title: Auth Fix
118
+ Objective: Restore CLI login flow
119
+ Output: Config key added, login passes
120
+ Next: Run smoke check
121
+ ```
122
+
123
+ ### Example 5: `json-compact`
124
+
125
+ ```json
126
+ {"status":"ok","mode":"json-compact","next":"deploy"}
127
+ ```
128
+
129
+ ### Example 6: `binary-decision`
130
+
131
+ ```text
132
+ yes: tests pass on required suite
133
+ ```
134
+
135
+ ---
136
+
137
+ ## Prompt Patterns
138
+
139
+ These are prompt fragments, not terminal commands.
140
+
141
+ ```text
142
+ mode: neandertal
143
+ mode: machine
144
+ mode: step-brief
145
+ mode: toon
146
+ mode: json-compact
147
+ mode: binary-decision
148
+ ```
149
+
150
+ ```text
151
+ explain in detail
152
+ ```
153
+
154
+ ---
155
+
156
+ ## Resources
157
+
158
+ - Mode protocol reference: [references/mode-protocols.md](references/mode-protocols.md)
159
+ - Related complexity control: [../token-optimizer/SKILL.md](../token-optimizer/SKILL.md)
@@ -0,0 +1,33 @@
1
+ {
2
+ "id": "output-optimizer",
3
+ "title": "Output Optimizer",
4
+ "description": "Optimize output token consumption through compact interpreter modes with controlled expansion when complexity, ambiguity, or risk requires more detail. Trigger: minimizing response verbosity while preserving clarity and correctness.",
5
+ "portable": true,
6
+ "tags": ["core", "workflow", "efficiency", "communication"],
7
+ "detectors": ["always"],
8
+ "detectionTriggers": ["always"],
9
+ "installsFor": ["all"],
10
+ "agentSupport": ["codex", "claude", "cursor", "gemini", "copilot", "antigravity", "windsurf", "trae"],
11
+ "skillMetadata": {
12
+ "author": "skilly-hand",
13
+ "last-edit": "2026-04-07",
14
+ "license": "Apache-2.0",
15
+ "version": "1.0.0",
16
+ "changelog": "Added a new portable output compression skill with deterministic interpreter modes and guarded detail expansion; reduces response token costs while preserving safety and clarity; affects response shaping workflows and catalog routing",
17
+ "auto-invoke": "When minimizing output verbosity or selecting compact communication modes",
18
+ "allowed-tools": [
19
+ "Read",
20
+ "Edit",
21
+ "Write",
22
+ "Glob",
23
+ "Grep",
24
+ "Bash",
25
+ "Task"
26
+ ]
27
+ },
28
+ "files": [
29
+ { "path": "SKILL.md", "kind": "instruction" },
30
+ { "path": "references/mode-protocols.md", "kind": "reference" }
31
+ ],
32
+ "dependencies": []
33
+ }
@@ -0,0 +1,76 @@
1
+ # Output Optimizer Mode Protocols
2
+
3
+ ## Activation Protocol
4
+
5
+ - Explicit selector format: `mode: <name>`
6
+ - Canonical names:
7
+ - `neandertal`
8
+ - `machine`
9
+ - `step-brief`
10
+ - `toon`
11
+ - `json-compact`
12
+ - `binary-decision`
13
+ - Resolution precedence:
14
+ 1. explicit mode
15
+ 2. inferred mode from wording
16
+ 3. default `step-brief`
17
+
18
+ ## TOON Protocol (Strict)
19
+
20
+ Always output these four blocks in this exact order:
21
+
22
+ 1. `Title`
23
+ 2. `Objective`
24
+ 3. `Output`
25
+ 4. `Next`
26
+
27
+ Constraints:
28
+
29
+ - One short line per block.
30
+ - No extra blocks.
31
+ - No decorative or comic phrasing requirement.
32
+
33
+ ## `json-compact` Protocol
34
+
35
+ Use compact JSON with minimal stable keys:
36
+
37
+ ```json
38
+ {"status":"<value>","mode":"json-compact","next":"<value>"}
39
+ ```
40
+
41
+ Rules:
42
+
43
+ - Keep keys short and predictable.
44
+ - Keep values concise.
45
+ - No explanatory prose outside JSON.
46
+
47
+ ## `binary-decision` Protocol
48
+
49
+ Output contract:
50
+
51
+ ```text
52
+ yes: <short reason>
53
+ ```
54
+
55
+ or
56
+
57
+ ```text
58
+ no: <short reason>
59
+ ```
60
+
61
+ Rules:
62
+
63
+ - Exactly one decision token: `yes` or `no`.
64
+ - Exactly one brief reason.
65
+ - No extra paragraphs.
66
+
67
+ ## Expansion Guard
68
+
69
+ Expand output only if one or more apply:
70
+
71
+ - Complexity threatens correctness.
72
+ - Ambiguity prevents safe execution.
73
+ - Risk is material.
74
+ - User explicitly asks for detail.
75
+
76
+ When expanded, preserve the selected mode shape as much as possible.
@@ -0,0 +1,163 @@
1
+ # Project Security Guide
2
+
3
+ ## When to Use
4
+
5
+ Use this skill when:
6
+
7
+ - You need to prevent secret leaks or insecure config from entering source control.
8
+ - You are preparing to commit, push, or publish and want enforced security gates.
9
+ - You need portable security checks across npm, pnpm, yarn, GitHub, GitLab, or generic CI.
10
+ - You are reviewing repository settings, package metadata, lockfiles, and workflow files for risk.
11
+
12
+ Do not use this skill for:
13
+
14
+ - Runtime penetration testing of deployed environments.
15
+ - Cloud infrastructure hardening outside the repository scope.
16
+ - Compliance audits that require organization-specific legal controls beyond repository security.
17
+
18
+ ---
19
+
20
+ ## Critical Patterns
21
+
22
+ ### Pattern 1: Scan High-Risk Repository Surfaces First
23
+
24
+ Prioritize files that most often leak credentials or unsafe release behavior:
25
+
26
+ 1. Local config and env surfaces (`.env*`, settings files, tool config, secrets material).
27
+ 2. Package and release metadata (`package.json`, lockfiles, publish config, scripts).
28
+ 3. Ignore and policy boundaries (`.gitignore`, `.npmignore`, allow/deny lists).
29
+ 4. CI/CD workflows (`.github/workflows`, `.gitlab-ci.yml`, release jobs).
30
+
31
+ Use the baseline checklist in [assets/high-risk-files-checklist.md](assets/high-risk-files-checklist.md).
32
+
33
+ ### Pattern 2: Enforce Gates by Delivery Stage
34
+
35
+ Use increasing guardrails by stage:
36
+
37
+ - **Commit gate**: fast checks for hardcoded secrets, committed env files, and critical ignore hygiene.
38
+ - **Push gate**: commit gate plus supply-chain and workflow safety checks.
39
+ - **Publish gate**: push gate plus release-surface validation (publish scripts/config and package contents).
40
+
41
+ ### Pattern 3: Block on High-Risk by Default
42
+
43
+ - **Blocker (fail immediately)** examples: confirmed secrets, private keys, tracked `.env` files, unsafe publish exposure.
44
+ - **Warning (non-blocking)** examples: low-confidence token patterns, optional hardening gaps, advisory-only dependency alerts.
45
+
46
+ Default policy:
47
+
48
+ 1. Exit non-zero for blockers.
49
+ 2. Treat dependency-audit failures as blocking by default in push and CI gates.
50
+ 3. Do not provide warning-mode bypasses for dependency audit failures in enforced gates.
51
+
52
+ ### Pattern 4: Keep Gate Execution Deterministic
53
+
54
+ - Do not use dynamic command override execution for core gate logic.
55
+ - Resolve commands in a fixed order only: `pnpm` -> `yarn` -> `npm` -> `node scripts/security-check.mjs`.
56
+ - Fail closed when no valid runner or lockfile path is available.
57
+ - Do not include bypass environment flags for enforced gates.
58
+
59
+ ### Pattern 5: Stay Package-Manager and CI Agnostic
60
+
61
+ Always provide equivalent paths for npm, pnpm, yarn, and generic shell runners.
62
+
63
+ - Do not assume one package manager.
64
+ - Detect lockfiles and use the matching command path when possible.
65
+ - Keep templates portable and adapter-based.
66
+
67
+ ---
68
+
69
+ ## Decision Tree
70
+
71
+ ```text
72
+ Need checks before local commits? -> Install pre-commit gate template
73
+ Need checks before remote integration? -> Install pre-push gate template
74
+ Need checks before package release/publication? -> Install pre-publish gate and CI release gate
75
+ Single-platform pipeline only? -> Use platform adapter (GitHub or GitLab)
76
+ Multiple platforms or uncertain tooling? -> Use generic gate script + adapter wrappers
77
+ Otherwise -> Apply all three gates (commit, push, publish)
78
+ ```
79
+
80
+ ---
81
+
82
+ ## Code Examples
83
+
84
+ ### Example 1: Security Check Script in `package.json`
85
+
86
+ ```json
87
+ {
88
+ "scripts": {
89
+ "security:check": "node scripts/security-check.mjs"
90
+ }
91
+ }
92
+ ```
93
+
94
+ ### Example 2: Commit Gate Wiring (Git Hook)
95
+
96
+ ```sh
97
+ cp catalog/skills/project-security/assets/pre-commit.sample.sh .git/hooks/pre-commit
98
+ chmod +x .git/hooks/pre-commit
99
+ ```
100
+
101
+ ### Example 3: Publish Gate Wiring (Package Script)
102
+
103
+ ```json
104
+ {
105
+ "scripts": {
106
+ "prepublishOnly": "sh catalog/skills/project-security/assets/pre-publish.sample.sh"
107
+ }
108
+ }
109
+ ```
110
+
111
+ ---
112
+
113
+ ## Commands
114
+
115
+ ```bash
116
+ # Core check command (generic)
117
+ node scripts/security-check.mjs
118
+
119
+ # npm
120
+ npm run --silent security:check
121
+
122
+ # pnpm
123
+ pnpm run -s security:check
124
+
125
+ # yarn
126
+ yarn -s security:check
127
+
128
+ # Install git hook gates
129
+ cp catalog/skills/project-security/assets/pre-commit.sample.sh .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
130
+ cp catalog/skills/project-security/assets/pre-push.sample.sh .git/hooks/pre-push && chmod +x .git/hooks/pre-push
131
+
132
+ # Run a generic CI gate script
133
+ sh catalog/skills/project-security/assets/generic-ci-security-gate.sh
134
+
135
+ ```
136
+
137
+ ---
138
+
139
+ ## Workflow Adapters
140
+
141
+ - GitHub Actions snippet: [assets/github-actions-security-gate.yml](assets/github-actions-security-gate.yml)
142
+ - GitLab CI snippet: [assets/gitlab-ci-security-gate.yml](assets/gitlab-ci-security-gate.yml)
143
+ - Generic CI entrypoint: [assets/generic-ci-security-gate.sh](assets/generic-ci-security-gate.sh)
144
+
145
+ ---
146
+
147
+ ## Resources
148
+
149
+ - High-risk file checklist: [assets/high-risk-files-checklist.md](assets/high-risk-files-checklist.md)
150
+ - Shared deterministic resolver: [assets/run-security-check.shared.sh](assets/run-security-check.shared.sh)
151
+ - Commit gate template: [assets/pre-commit.sample.sh](assets/pre-commit.sample.sh)
152
+ - Push gate template: [assets/pre-push.sample.sh](assets/pre-push.sample.sh)
153
+ - Publish gate template: [assets/pre-publish.sample.sh](assets/pre-publish.sample.sh)
154
+
155
+ ---
156
+
157
+ ## Breaking Behavior Note
158
+
159
+ - Audit failures now block by default in push and CI gates.
160
+ - GitHub CI template fails when `package.json` exists without a lockfile.
161
+ - Publish gate now requires the bundled generic gate script and fails closed when it is missing.
162
+ - `SECURITY_CHECK_CMD` override is removed for deterministic gate execution.
163
+ - `SKIP_SECURITY_GATES` and `ENABLE_SUPPLY_CHAIN_WARNINGS` bypass flags are removed from templates.
@@ -0,0 +1,36 @@
1
+ #!/bin/sh
2
+ set -eu
3
+
4
+ script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
5
+ # shellcheck source=/dev/null
6
+ . "$script_dir/run-security-check.shared.sh"
7
+
8
+ run_supply_chain_check() {
9
+ if [ -f "pnpm-lock.yaml" ] && command -v pnpm >/dev/null 2>&1; then
10
+ if ! pnpm audit --prod; then
11
+ echo "[project-security] pnpm audit reported issues." >&2
12
+ return 1
13
+ fi
14
+ return
15
+ fi
16
+
17
+ if [ -f "yarn.lock" ] && command -v yarn >/dev/null 2>&1; then
18
+ if ! yarn npm audit; then
19
+ echo "[project-security] yarn audit reported issues." >&2
20
+ return 1
21
+ fi
22
+ return
23
+ fi
24
+
25
+ if [ -f "package-lock.json" ] && command -v npm >/dev/null 2>&1; then
26
+ if ! npm audit --audit-level=high; then
27
+ echo "[project-security] npm audit reported issues." >&2
28
+ return 1
29
+ fi
30
+ return
31
+ fi
32
+ }
33
+
34
+ echo "[project-security] running CI security gate..."
35
+ run_security_check
36
+ run_supply_chain_check
@@ -0,0 +1,38 @@
1
+ name: security-gate
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - "**"
8
+ release:
9
+ types: [published]
10
+
11
+ jobs:
12
+ security:
13
+ runs-on: ubuntu-24.04
14
+ steps:
15
+ - name: Checkout
16
+ uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
17
+
18
+ - name: Setup Node
19
+ uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
20
+ with:
21
+ node-version: "20"
22
+
23
+ - name: Install dependencies (auto-detect package manager)
24
+ run: |
25
+ corepack enable
26
+ if [ -f pnpm-lock.yaml ]; then
27
+ pnpm install --frozen-lockfile
28
+ elif [ -f yarn.lock ]; then
29
+ yarn install --immutable
30
+ elif [ -f package-lock.json ]; then
31
+ npm ci
32
+ elif [ -f package.json ]; then
33
+ echo "[project-security] missing lockfile; refusing non-deterministic install" >&2
34
+ exit 1
35
+ fi
36
+
37
+ - name: Run security gate
38
+ run: sh catalog/skills/project-security/assets/generic-ci-security-gate.sh
@@ -0,0 +1,21 @@
1
+ security_gate:
2
+ stage: test
3
+ rules:
4
+ - if: '$CI_PIPELINE_SOURCE == "push"'
5
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
6
+ - if: '$CI_COMMIT_TAG'
7
+ before_script:
8
+ - corepack enable
9
+ - |
10
+ if [ -f pnpm-lock.yaml ]; then
11
+ pnpm install --frozen-lockfile
12
+ elif [ -f yarn.lock ]; then
13
+ yarn install --immutable
14
+ elif [ -f package-lock.json ]; then
15
+ npm ci
16
+ elif [ -f package.json ]; then
17
+ echo "[project-security] missing lockfile; refusing non-deterministic install" >&2
18
+ exit 1
19
+ fi
20
+ script:
21
+ - sh catalog/skills/project-security/assets/generic-ci-security-gate.sh
@@ -0,0 +1,49 @@
1
+ # High-Risk Repository Security Checklist
2
+
3
+ Use this baseline list before commit, push, and publish.
4
+
5
+ ## 1) Secrets and Credentials
6
+
7
+ - `.env`, `.env.*`, `.secrets*`, `.credentials*`
8
+ - PEM/SSH/private key material (`*.pem`, `id_rsa`, `id_ed25519`, PKCS#12 files)
9
+ - API keys and tokens in source/config/test fixtures
10
+ - Service-account JSON or cloud credentials
11
+
12
+ ## 2) Project and Tool Settings
13
+
14
+ - IDE and editor settings that may contain local paths/tokens
15
+ - Tool config files (linters, build tools, release bots) with embedded secrets
16
+ - MCP, AI assistant, or integration config files containing auth material
17
+
18
+ ## 3) Package and Publish Surface
19
+
20
+ - `package.json` scripts that expose secrets in command arguments
21
+ - `package-lock.json`, `pnpm-lock.yaml`, `yarn.lock` integrity and unexpected source URLs
22
+ - `.npmrc`, `.yarnrc*`, `.pnpmfile.cjs` for leaked tokens or unsafe registries
23
+ - Publish include/exclude controls (`files`, `.npmignore`) to avoid shipping sensitive files
24
+
25
+ ## 4) Source-Control Boundaries
26
+
27
+ - `.gitignore` and optional global ignore parity for env/secrets artifacts
28
+ - Accidental tracking of generated artifacts containing secrets
29
+ - Branch/workflow policies that bypass checks
30
+
31
+ ## 5) CI/CD and Release Definitions
32
+
33
+ - `.github/workflows/*.yml` and `.gitlab-ci.yml` secret handling
34
+ - Unmasked logging of env vars/tokens
35
+ - Publish and release jobs missing security checks
36
+
37
+ ## 6) Blocker vs Warning Guidance
38
+
39
+ Blockers:
40
+
41
+ - Confirmed secret/token/private key exposure
42
+ - Tracked env files with sensitive values
43
+ - Publish configuration that includes secrets or private internals
44
+
45
+ Warnings:
46
+
47
+ - Suspicious but unconfirmed patterns
48
+ - Optional hardening opportunities (pinning, stricter masks, policy tuning)
49
+ - Advisory-only dependency concerns without exploit path evidence
@@ -0,0 +1,9 @@
1
+ #!/bin/sh
2
+ set -eu
3
+
4
+ script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
5
+ # shellcheck source=/dev/null
6
+ . "$script_dir/run-security-check.shared.sh"
7
+
8
+ echo "[project-security] running commit gate..."
9
+ run_security_check
@@ -0,0 +1,12 @@
1
+ #!/bin/sh
2
+ set -eu
3
+
4
+ script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
5
+
6
+ if [ -f "$script_dir/generic-ci-security-gate.sh" ]; then
7
+ sh "$script_dir/generic-ci-security-gate.sh"
8
+ exit 0
9
+ fi
10
+
11
+ echo "[project-security] generic publish gate script is missing: $script_dir/generic-ci-security-gate.sh" >&2
12
+ exit 1
@@ -0,0 +1,38 @@
1
+ #!/bin/sh
2
+ set -eu
3
+
4
+ script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
5
+ # shellcheck source=/dev/null
6
+ . "$script_dir/run-security-check.shared.sh"
7
+
8
+ run_optional_supply_chain_check() {
9
+ if [ -f "pnpm-lock.yaml" ] && command -v pnpm >/dev/null 2>&1; then
10
+ if ! pnpm audit --prod; then
11
+ echo "[project-security] pnpm audit reported issues." >&2
12
+ return 1
13
+ fi
14
+ return 0
15
+ fi
16
+
17
+ if [ -f "yarn.lock" ] && command -v yarn >/dev/null 2>&1; then
18
+ if ! yarn npm audit; then
19
+ echo "[project-security] yarn audit reported issues." >&2
20
+ return 1
21
+ fi
22
+ return 0
23
+ fi
24
+
25
+ if [ -f "package-lock.json" ] && command -v npm >/dev/null 2>&1; then
26
+ if ! npm audit --audit-level=high; then
27
+ echo "[project-security] npm audit reported issues." >&2
28
+ return 1
29
+ fi
30
+ return 0
31
+ fi
32
+
33
+ return 0
34
+ }
35
+
36
+ echo "[project-security] running push gate..."
37
+ run_security_check
38
+ run_optional_supply_chain_check
@@ -0,0 +1,27 @@
1
+ #!/bin/sh
2
+ set -eu
3
+
4
+ run_security_check() {
5
+ if [ -f "pnpm-lock.yaml" ] && command -v pnpm >/dev/null 2>&1; then
6
+ pnpm run -s security:check
7
+ return
8
+ fi
9
+
10
+ if [ -f "yarn.lock" ] && command -v yarn >/dev/null 2>&1; then
11
+ yarn -s security:check
12
+ return
13
+ fi
14
+
15
+ if [ -f "package.json" ] && command -v npm >/dev/null 2>&1; then
16
+ npm run --silent security:check
17
+ return
18
+ fi
19
+
20
+ if [ -f "scripts/security-check.mjs" ] && command -v node >/dev/null 2>&1; then
21
+ node scripts/security-check.mjs
22
+ return
23
+ fi
24
+
25
+ echo "[project-security] no security check command available." >&2
26
+ return 1
27
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "id": "project-security",
3
+ "title": "Project Security",
4
+ "description": "Scan project configuration and release surfaces for leak and security risks, and enforce security gates on commit, push, and publish workflows across GitHub, GitLab, npm, pnpm, yarn, and generic CI. Trigger: validating repository security posture, preventing secret leaks, or hardening delivery pipelines.",
5
+ "portable": true,
6
+ "tags": ["security", "workflow", "quality", "core"],
7
+ "detectors": ["always"],
8
+ "detectionTriggers": ["manual"],
9
+ "installsFor": ["all"],
10
+ "agentSupport": ["codex", "claude", "cursor", "gemini", "copilot", "antigravity", "windsurf", "trae"],
11
+ "skillMetadata": {
12
+ "author": "skilly-hand",
13
+ "last-edit": "2026-04-07",
14
+ "license": "Apache-2.0",
15
+ "version": "1.0.0",
16
+ "changelog": "Added portable project-security skill with commit/push/publish gating assets and CI templates; reduces secret leak and misconfiguration risk before delivery; affects catalog security workflow coverage and auto-invoke routing",
17
+ "auto-invoke": "Scanning project configuration and delivery workflows for leaks or security issues before commit, push, or publish",
18
+ "allowed-tools": [
19
+ "Read",
20
+ "Edit",
21
+ "Write",
22
+ "Glob",
23
+ "Grep",
24
+ "Bash",
25
+ "Task",
26
+ "SubAgent"
27
+ ]
28
+ },
29
+ "files": [
30
+ { "path": "SKILL.md", "kind": "instruction" },
31
+ { "path": "assets/high-risk-files-checklist.md", "kind": "asset" },
32
+ { "path": "assets/pre-commit.sample.sh", "kind": "asset" },
33
+ { "path": "assets/pre-push.sample.sh", "kind": "asset" },
34
+ { "path": "assets/pre-publish.sample.sh", "kind": "asset" },
35
+ { "path": "assets/run-security-check.shared.sh", "kind": "asset" },
36
+ { "path": "assets/generic-ci-security-gate.sh", "kind": "asset" },
37
+ { "path": "assets/github-actions-security-gate.yml", "kind": "asset" },
38
+ { "path": "assets/gitlab-ci-security-gate.yml", "kind": "asset" }
39
+ ],
40
+ "dependencies": []
41
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/skilly-hand",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "license": "CC-BY-NC-4.0",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/catalog",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/cli",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/core",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/detectors",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }