@namewta/speculo 2.0.5 → 2.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/README.md +3 -0
- package/THIRD-PARTY-NOTICES.md +4 -0
- package/dist/src/agent-skills.d.ts +5 -0
- package/dist/src/agent-skills.js +10 -7
- package/dist/src/agent-skills.js.map +1 -1
- package/dist/src/cli.js +17 -4
- package/dist/src/cli.js.map +1 -1
- package/dist/src/coordination.d.ts +3 -3
- package/dist/src/coordination.js +21 -4
- package/dist/src/coordination.js.map +1 -1
- package/dist/src/doctor.js +8 -1
- package/dist/src/doctor.js.map +1 -1
- package/dist/src/external-files.d.ts +4 -2
- package/dist/src/external-files.js +4 -4
- package/dist/src/external-files.js.map +1 -1
- package/dist/src/hub-catalog.d.ts +11 -0
- package/dist/src/hub-catalog.js +91 -0
- package/dist/src/hub-catalog.js.map +1 -0
- package/dist/src/hub-resources.json +1 -0
- package/dist/src/hub-skills.d.ts +53 -0
- package/dist/src/hub-skills.js +157 -0
- package/dist/src/hub-skills.js.map +1 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.js +48 -47
- package/dist/src/index.js.map +1 -1
- package/dist/src/install-ui.d.ts +16 -0
- package/dist/src/install-ui.js +67 -11
- package/dist/src/install-ui.js.map +1 -1
- package/dist/src/manifest.d.ts +2 -0
- package/dist/src/manifest.js +2 -0
- package/dist/src/manifest.js.map +1 -1
- package/dist/src/refresh.d.ts +1 -0
- package/dist/src/refresh.js +13 -10
- package/dist/src/refresh.js.map +1 -1
- package/dist/src/retained-workflows.d.ts +10 -0
- package/dist/src/retained-workflows.js +25 -0
- package/dist/src/retained-workflows.js.map +1 -0
- package/dist/src/runtime-entry.d.ts +1 -0
- package/dist/src/runtime-entry.js +1 -0
- package/dist/src/runtime-entry.js.map +1 -1
- package/dist/src/skill-trees.d.ts +27 -0
- package/dist/src/skill-trees.js +118 -0
- package/dist/src/skill-trees.js.map +1 -0
- package/dist/src/transaction.d.ts +3 -14
- package/dist/src/transaction.js +20 -36
- package/dist/src/transaction.js.map +1 -1
- package/dist/src/workflow-install.d.ts +15 -0
- package/dist/src/workflow-install.js +104 -0
- package/dist/src/workflow-install.js.map +1 -0
- package/package.json +4 -2
- package/skills-hub/automation/grok-bot-team-steward/CHEATSHEET.md +17 -0
- package/skills-hub/automation/grok-bot-team-steward/INSTALL.md +23 -0
- package/skills-hub/automation/grok-bot-team-steward/LICENSE +21 -0
- package/skills-hub/automation/grok-bot-team-steward/README.md +9 -0
- package/skills-hub/automation/grok-bot-team-steward/SKILL.md +52 -0
- package/skills-hub/automation/grok-bot-team-steward/agents/openai.yaml +4 -0
- package/skills-hub/automation/grok-bot-team-steward/references/00-hard-rules.md +50 -0
- package/skills-hub/automation/grok-bot-team-steward/references/01-snapshot-schema.md +84 -0
- package/skills-hub/automation/grok-bot-team-steward/references/02-export-protocol.md +57 -0
- package/skills-hub/automation/grok-bot-team-steward/references/03-restore-protocol.md +64 -0
- package/skills-hub/automation/grok-bot-team-steward/references/04-inventory.md +37 -0
- package/skills-hub/automation/grok-bot-team-steward/references/05-conversations.md +71 -0
- package/skills-hub/automation/grok-bot-team-steward/references/06-sanitizer.md +39 -0
- package/skills-hub/automation/grok-bot-team-steward/references/07-prompts.md +87 -0
- package/skills-hub/automation/grok-bot-team-steward/references/08-verification.md +30 -0
- package/skills-hub/automation/grok-bot-team-steward/references/09-sources.md +31 -0
- package/skills-hub/automation/grok-bot-team-steward/scripts/scrub.sh +17 -0
- package/skills-hub/automation/grok-bot-team-steward/scripts/snapshot-name.sh +18 -0
- package/skills-hub/automation/grok-bot-team-steward/scripts/validate-snapshot.sh +62 -0
- package/skills-hub/automation/grok-bot-team-steward/steward/ACTIVATE.md +58 -0
- package/skills-hub/automation/grok-bot-team-steward/steward/SETUP-INSTRUCTIONS.md +33 -0
- package/skills-hub/automation/grok-bot-team-steward/steward/STEWARD-PROFILE.md +28 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/CHANGELOG.md +3 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/CHARTER.md +27 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/DROP-LIST.md +10 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/GAPS.md +6 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/INIT.md +14 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/MANIFEST.md +30 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/MANIFEST.yaml +20 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/ORG.md +15 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/README.md +8 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/RESTORE.md +13 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/ROSTER.md +11 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/GAPS.md +7 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/MEMORY.md +9 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/PROFILE.md +27 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/agent-spec.md +9 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/conversations/INDEX.md +5 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/conversations/main.md +9 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/routines.md +5 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/skills.md +5 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/connectors.md +7 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/meta/COMPLETED.md +6 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/meta/CREATED.md +6 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/meta/RESTORE-NOTES.md +13 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/meta/SANITIZER.md +7 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/meta/SOURCE.md +8 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/rooms/_ROOM.md +8 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/routines/_ROUTINE.md +12 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/shared/shared-memory.md +5 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/shared/workspace-map.md +5 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/skills/_SKILL/SKILL.md +18 -0
- package/skills-hub/automation/herdr/SKILL.md +246 -0
- package/skills-hub/automation/orca/SKILL.md +328 -0
- package/skills-hub/coding/gitea-repo/LICENSE +21 -0
- package/skills-hub/coding/gitea-repo/SKILL.md +50 -0
- package/skills-hub/coding/gitea-repo/agents/openai.yaml +4 -0
- package/skills-hub/coding/gitea-repo/references/auth-and-scopes.md +58 -0
- package/skills-hub/coding/gitea-repo/references/endpoint-map.md +80 -0
- package/skills-hub/coding/gitea-repo/references/pagination-and-errors.md +34 -0
- package/skills-hub/coding/gitea-repo/scripts/gitea_api.py +814 -0
- package/skills-hub/coding/github-repo-steward/LICENSE +21 -0
- package/skills-hub/coding/github-repo-steward/SKILL.md +48 -0
- package/skills-hub/coding/github-repo-steward/agents/openai.yaml +4 -0
- package/skills-hub/coding/github-repo-steward/references/00-auth-and-tokens.md +73 -0
- package/skills-hub/coding/github-repo-steward/references/01-inventory.md +55 -0
- package/skills-hub/coding/github-repo-steward/references/02-lifecycle.md +57 -0
- package/skills-hub/coding/github-repo-steward/references/03-stars.md +42 -0
- package/skills-hub/coding/github-repo-steward/references/04-hygiene.md +40 -0
- package/skills-hub/coding/github-repo-steward/references/05-sources.md +42 -0
- package/skills-hub/coding/github-repo-steward/scripts/inventory.sh +64 -0
- package/skills-hub/coding/vscode-fullstack/LICENSE +21 -0
- package/skills-hub/coding/vscode-fullstack/SKILL.md +47 -0
- package/skills-hub/coding/vscode-fullstack/agents/openai.yaml +4 -0
- package/skills-hub/coding/vscode-fullstack/references/extensions-and-settings.md +181 -0
- package/skills-hub/coding/vscode-fullstack/references/profiles-and-validation.md +62 -0
- package/skills-hub/coding/vscode-fullstack/references/runtime-reuse.md +52 -0
- package/skills-hub/design/photo-retouch/LICENSE +21 -0
- package/skills-hub/design/photo-retouch/SKILL.md +50 -0
- package/skills-hub/design/photo-retouch/agents/openai.yaml +4 -0
- package/skills-hub/design/photo-retouch/references/basic-retouch.md +58 -0
- package/skills-hub/design/photo-retouch/references/formal-portrait.md +57 -0
- package/skills-hub/design/photo-retouch/references/object-and-canvas.md +82 -0
- package/skills-hub/design/photo-retouch/references/product-photo.md +41 -0
- package/skills-hub/design/photo-retouch/references/repair-and-look.md +61 -0
- package/skills-hub/design/photo-retouch/references/social-effects.md +55 -0
- package/skills-hub/design/photo-retouch/references/travel-creative.md +79 -0
- package/skills-hub/system/clash-client-profile/LICENSE +21 -0
- package/skills-hub/system/clash-client-profile/SKILL.md +79 -0
- package/skills-hub/system/clash-client-profile/agents/openai.yaml +4 -0
- package/skills-hub/system/clash-client-profile/references/acceptance.md +81 -0
- package/skills-hub/system/clash-client-profile/references/browser-privacy.md +35 -0
- package/skills-hub/system/clash-client-profile/references/clash-verge.md +40 -0
- package/skills-hub/system/clash-client-profile/references/dns-workflow.md +147 -0
- package/skills-hub/system/clash-client-profile/references/flclash.md +24 -0
- package/skills-hub/system/clash-client-profile/references/network-performance.md +25 -0
- package/skills-hub/system/clash-client-profile/references/platform-dns.md +109 -0
- package/skills-hub/system/clash-client-profile/references/sources.md +46 -0
- package/skills-hub/system/clash-client-profile/references/troubleshooting.md +82 -0
- package/skills-hub/system/clash-client-profile/scripts/dns_guard.py +650 -0
- package/skills-hub/system/clash-client-profile/scripts/proxy_doctor.py +213 -0
- package/skills-hub/system/clash-client-profile/scripts/render_rules.py +34 -0
- package/skills-hub/system/clash-client-profile/templates/ai-rules.yaml +18 -0
- package/skills-hub/system/clash-client-profile/templates/dns-request.example.json +9 -0
- package/skills-hub/system/clash-client-profile/templates/dns.yaml +8 -0
- package/skills-hub/system/linux-dev-disk-cleanup/LICENSE +21 -0
- package/skills-hub/system/linux-dev-disk-cleanup/SKILL.md +42 -0
- package/skills-hub/system/linux-dev-disk-cleanup/agents/openai.yaml +4 -0
- package/skills-hub/system/linux-dev-disk-cleanup/references/linux-cleanup-workflow.md +145 -0
- package/skills-hub/system/optimize-codex-config/LICENSE +21 -0
- package/skills-hub/system/optimize-codex-config/SKILL.md +101 -0
- package/skills-hub/system/optimize-codex-config/agents/openai.yaml +4 -0
- package/skills-hub/system/optimize-codex-config/assets/capabilities.example.json +22 -0
- package/skills-hub/system/optimize-codex-config/references/cli.md +35 -0
- package/skills-hub/system/optimize-codex-config/references/configuration-contract.md +33 -0
- package/skills-hub/system/optimize-codex-config/references/optimization-method.md +38 -0
- package/skills-hub/system/optimize-codex-config/references/privacy.md +41 -0
- package/skills-hub/system/optimize-codex-config/references/sources.md +24 -0
- package/skills-hub/system/optimize-codex-config/references/statusline.md +31 -0
- package/skills-hub/system/optimize-codex-config/references/transactions.md +32 -0
- package/skills-hub/system/optimize-codex-config/references/troubleshooting.md +95 -0
- package/skills-hub/system/optimize-codex-config/scripts/adapters/claude.mjs +24 -0
- package/skills-hub/system/optimize-codex-config/scripts/adapters/codex.mjs +10 -0
- package/skills-hub/system/optimize-codex-config/scripts/ai-cli-config.mjs +67 -0
- package/skills-hub/system/optimize-codex-config/scripts/audit-codex-config.mjs +762 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/document.mjs +166 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/inspect.mjs +211 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/io.mjs +104 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/plan.mjs +79 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/transaction.mjs +205 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/writers.mjs +46 -0
- package/skills-hub/system/optimize-codex-config/scripts/statusline/claude-statusline.mjs +94 -0
- package/skills-hub/system/optimize-codex-config/scripts/vendor/THIRD-PARTY-NOTICES.txt +250 -0
- package/skills-hub/system/optimize-codex-config/scripts/vendor/build-package-lock.json +488 -0
- package/skills-hub/system/optimize-codex-config/scripts/vendor/manifest.json +14 -0
- package/skills-hub/system/optimize-codex-config/scripts/vendor/parsers.mjs +16 -0
- package/skills-hub/system/proxy-region-locale/LICENSE +21 -0
- package/skills-hub/system/proxy-region-locale/SKILL.md +42 -0
- package/skills-hub/system/proxy-region-locale/agents/openai.yaml +4 -0
- package/skills-hub/system/proxy-region-locale/references/linux.md +35 -0
- package/skills-hub/system/proxy-region-locale/references/macos.md +31 -0
- package/skills-hub/system/proxy-region-locale/references/windows.md +45 -0
- package/skills-hub/system/system-health-audit/LICENSE +21 -0
- package/skills-hub/system/system-health-audit/SKILL.md +41 -0
- package/skills-hub/system/system-health-audit/agents/openai.yaml +4 -0
- package/skills-hub/system/system-health-audit/references/platforms.md +37 -0
- package/skills-hub/system/system-health-audit/scripts/system_audit.py +41 -0
- package/skills-hub/system/windows-dev-disk-cleanup/LICENSE +21 -0
- package/skills-hub/system/windows-dev-disk-cleanup/SKILL.md +40 -0
- package/skills-hub/system/windows-dev-disk-cleanup/agents/openai.yaml +4 -0
- package/skills-hub/system/windows-dev-disk-cleanup/references/windows-cleanup-workflow.md +121 -0
- package/skills-hub/writing/.gitkeep +0 -0
- package/skills-hub/writing/job-application/LICENSE +21 -0
- package/skills-hub/writing/job-application/SKILL.md +160 -0
- package/skills-hub/writing/job-application/agents/openai.yaml +4 -0
- package/skills-hub/writing/job-application/assets/resume.css +10 -0
- package/skills-hub/writing/job-application/config.example.json +9 -0
- package/skills-hub/writing/job-application/references/company-research.md +7 -0
- package/skills-hub/writing/job-application/references/corpus-schema.md +33 -0
- package/skills-hub/writing/job-application/references/honesty-gate.md +29 -0
- package/skills-hub/writing/job-application/references/improvement-plan.md +15 -0
- package/skills-hub/writing/job-application/references/ingest-protocol.md +18 -0
- package/skills-hub/writing/job-application/references/interview-speech.md +16 -0
- package/skills-hub/writing/job-application/references/jd-parse.md +18 -0
- package/skills-hub/writing/job-application/references/persist-paths.md +34 -0
- package/skills-hub/writing/job-application/references/question-bank.md +19 -0
- package/skills-hub/writing/job-application/references/rendering.md +9 -0
- package/skills-hub/writing/job-application/references/resume-playbook.md +30 -0
- package/skills-hub/writing/job-application/scripts/README.md +12 -0
- package/skills-hub/writing/job-application/scripts/ingest_kb.py +188 -0
- package/skills-hub/writing/job-application/scripts/render_resume.py +144 -0
- package/skills-hub/writing/job-application/scripts/validate_claims.py +52 -0
- package/skills-hub/writing/job-application/scripts/write_config.py +72 -0
- package/skills-hub/writing/job-application/templates/application-index.md +10 -0
- package/skills-hub/writing/job-application/templates/brief.md +16 -0
- package/skills-hub/writing/job-application/templates/changelog.md +6 -0
- package/skills-hub/writing/job-application/templates/company-research.md +15 -0
- package/skills-hub/writing/job-application/templates/corpus.md +11 -0
- package/skills-hub/writing/job-application/templates/evidence-map.md +5 -0
- package/skills-hub/writing/job-application/templates/framings.md +6 -0
- package/skills-hub/writing/job-application/templates/improvement-plan.md +16 -0
- package/skills-hub/writing/job-application/templates/ingest-log.md +4 -0
- package/skills-hub/writing/job-application/templates/known-gaps.md +4 -0
- package/skills-hub/writing/job-application/templates/match-report.md +21 -0
- package/skills-hub/writing/job-application/templates/methodology-cache.md +10 -0
- package/skills-hub/writing/job-application/templates/persist-index.md +11 -0
- package/skills-hub/writing/job-application/templates/profile.md +21 -0
- package/skills-hub/writing/job-application/templates/questions.md +22 -0
- package/skills-hub/writing/job-application/templates/resume-original.md +10 -0
- package/skills-hub/writing/job-application/templates/resume-tailored.md +21 -0
- package/skills-hub/writing/job-application/templates/sources-index.md +6 -0
- package/skills-hub/writing/job-application/templates/speech.md +19 -0
- package/skills-hub/writing/job-application/templates/stories.md +9 -0
- package/skills-hub/writing/job-application/templates/story-bank.md +11 -0
- package/skills-hub/writing/job-application/templates/strengths.md +4 -0
- package/skills-hub/writing/job-application/templates/style-memory.md +7 -0
- package/skills-hub/writing/ste-zh/LICENSE +21 -0
- package/skills-hub/writing/ste-zh/NOTICE.md +9 -0
- package/skills-hub/writing/ste-zh/SKILL.md +130 -0
- package/skills-hub/writing/ste-zh/agents/openai.yaml +6 -0
- package/skills-hub/writing/ste-zh/examples/zh-report.md +23 -0
- package/skills-hub/writing/ste-zh/references/english-modes.md +13 -0
- package/skills-hub/writing/ste-zh/references/terminology.md +13 -0
- package/skills-hub/writing/ste-zh/references/zh-rules.md +29 -0
- package/template/.speculo/refresh-contract.json +2 -0
- package/template/canonical/canonical-specdev-goal-plan.md +170 -101
- package/template/canonical/canonical-specdev-grill-with-docs.md +346 -277
- package/template/canonical/canonical-specdev-spec.md +346 -277
- package/template/canonical/canonical-specdev-tickets.md +346 -277
- package/template/canonical/canonical-specdev-wayfinder.md +346 -277
- package/template/lib/speculo-runtime.mjs +183 -8
- package/template/references/coordination/coordination-contract.md +12 -4
- package/template/references/coordination/modes/cli.md +3 -3
- package/template/references/coordination/modes/herdr.md +11 -11
- package/template/references/coordination/modes/orca.md +14 -14
- package/template/references/coordination/project-facts.schema.json +1 -0
- package/template/references/coordination/report-template.md +18 -0
- package/template/references/coordination/result-and-recovery.md +3 -3
- package/template/references/coordination/session-files.md +49 -56
- package/template/references/coordination/task-brief.md +3 -3
- package/template/references/coordination/task-template.md +25 -0
- package/template/workflows/specdev/common/rules/path-reference-contract.md +1 -1
- package/template/workflows/specdev/common/rules/workflow-state-and-lifecycle.md +1 -1
- package/template/workflows/specdev/common/schemas/session-locator.schema.json +15 -0
- package/template/workflows/specdev/common/skills/code-review/references/review-evidence.md +1 -1
- package/template/workflows/specdev/common/tools/README.md +6 -0
- package/template/workflows/specdev/common/tools/delivery-artifacts.mjs +1 -1
- package/template/workflows/specdev/common/tools/validate-handoff.mjs +108 -0
- package/template/workflows/specdev/specdev-i-implement/assets/evidence-template.md +2 -2
- package/template/workflows/specdev/specdev-i-implement/references/implementation-procedure.md +1 -1
- package/template/workflows/specdev/specdev-i-init-setup/SKILL.md +7 -6
- package/template/workflows/specdev/specdev-i-init-setup/references/first-setup.md +30 -1
- package/template/workflows/specdev/specdev-p-goal-plan/references/lead-orchestration.md +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ting'an Wang
|
|
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.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: github-repo-steward
|
|
3
|
+
description: 盘点个人 GitHub 仓库和 star,规划或执行具名归档、删除、star/unstar,并诊断 gh/PAT 权限。用于账号级整理;不处理代码修改、普通 issue 或 PR 创建。
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires GitHub CLI (gh), confirmed account/host and network; inventory.sh additionally requires Bash.
|
|
6
|
+
metadata:
|
|
7
|
+
author: NAMEWTA
|
|
8
|
+
wta-format-reviewed: '2026-10-06'
|
|
9
|
+
---
|
|
10
|
+
# GitHub 仓库管家
|
|
11
|
+
|
|
12
|
+
## 输入与输出契约
|
|
13
|
+
|
|
14
|
+
明确账号/host、可见仓库范围与模式(只读盘点、建议、具名执行)。已有清单沿用稳定 OWNER/REPO,不因一次授权扩展到新找到的仓库。
|
|
15
|
+
|
|
16
|
+
给出可见性/分页覆盖、逐仓库建议或执行对照和未知项;权限结论绑定本次 gh 身份与具体端点,不推广到连接器或另一个 PAT。
|
|
17
|
+
|
|
18
|
+
示例:“只盘点我个人 GitHub 账号的归档仓库和 star,给整理建议。”应进入本技能;“修复当前项目的 TypeScript 类型错误。”不应由本技能接管。
|
|
19
|
+
|
|
20
|
+
需要当前环境可用的 gh;现有 inventory.sh 还需要 Bash。先确认实际主机、shell、gh 版本及账号。Windows 没有 Bash 时不把 .sh 当 PowerShell 运行:使用 gh 的原生只读查询,标明与完整盘点脚本的覆盖差异,不自动安装 Git Bash/WSL。
|
|
21
|
+
|
|
22
|
+
技能目录从本文件定位;已有具名授权沿用,读取或整理建议不授权写入。
|
|
23
|
+
|
|
24
|
+
| 任务 | 参考 |
|
|
25
|
+
|---|---|
|
|
26
|
+
| 盘点 | [盘点与脚本](references/01-inventory.md) |
|
|
27
|
+
| star | [Stars](references/03-stars.md) |
|
|
28
|
+
| 归档/删除 | [生命周期](references/02-lifecycle.md) |
|
|
29
|
+
| 清理建议 | [Hygiene](references/04-hygiene.md) |
|
|
30
|
+
| 认证 | [认证诊断](references/00-auth-and-tokens.md) |
|
|
31
|
+
|
|
32
|
+
## 只读诊断
|
|
33
|
+
|
|
34
|
+
先 gh auth status 和必要的账号字段,不打印 token。gh 与连接器/MCP 可能使用不同身份,不能互借权限结论。确认 GitHub.com 或企业 host;不把凭据发送到未经确认的主机。
|
|
35
|
+
|
|
36
|
+
权限诊断禁止写探针。可读、permissions.admin 或仓库可见都不证明当前凭据能执行某一写动作。分页取全或标记部分;未见到的仓库不等于不存在。
|
|
37
|
+
|
|
38
|
+
## 具名动作
|
|
39
|
+
|
|
40
|
+
先确定 OWNER/REPO、动作、影响和已有授权。新增目标不继承旧清单授权。归档使用 gh repo archive 或 PATCH archived 布尔字段,gh api 用 -F 而不是字符串 -f。
|
|
41
|
+
|
|
42
|
+
删除先说明影响和有条件的恢复限制,不能保证 90 天都可恢复。star/unstar 只处理已批准对象。403 停止受影响动作,报告脱敏权限提示;不切换界面绕过。token 更新后在用户授权范围内重试,不索要明文 token。
|
|
43
|
+
|
|
44
|
+
不确定写入结果先只读核对,再决定是否重试。删除的 404 必须结合成功删除响应;独立 404 也可能是无权限。
|
|
45
|
+
|
|
46
|
+
## 完成
|
|
47
|
+
|
|
48
|
+
报告账号/host、覆盖、具名成功失败、实际状态和未知项。原生 Windows 与 POSIX 路径/引号分别验证,不能把脚本退出成功当成全量清单或写入成功。
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# 鉴权与 PAT
|
|
2
|
+
|
|
3
|
+
权威:`gh` 当前登录态。不要假设 MCP GitHub 与 `gh` 是同一 token。
|
|
4
|
+
|
|
5
|
+
## 先看什么
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
gh auth status
|
|
9
|
+
gh api -i user | rg -i 'x-oauth|x-accepted-github-permissions|github-authentication-token-expiration'
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
| token 前缀 | 种类 |
|
|
13
|
+
|---|---|
|
|
14
|
+
| `github_pat_` | Fine-grained PAT |
|
|
15
|
+
| `ghp_` | Classic PAT |
|
|
16
|
+
| `gho_` | OAuth app |
|
|
17
|
+
| `ghu_` / `ghs_` | GitHub App |
|
|
18
|
+
|
|
19
|
+
Fine-grained 没有 `X-OAuth-Scopes`。缺权限时看 **403 响应头** `X-Accepted-Github-Permissions`。
|
|
20
|
+
|
|
21
|
+
## 按动作选择最小权限(不是全部必选)
|
|
22
|
+
|
|
23
|
+
Fine-grained PAT(https://github.com/settings/personal-access-tokens ):
|
|
24
|
+
|
|
25
|
+
| 位置 | 权限 | 级别 | 用途 |
|
|
26
|
+
|---|---|---|---|
|
|
27
|
+
| Repository | Metadata | Read | 列仓、读描述(通常自动带上) |
|
|
28
|
+
| Repository | Contents | Read and write | clone/push;只读盘点可 Read |
|
|
29
|
+
| Repository | Administration | **Read and write** | 归档、取消归档、改设置、**删除仓库** |
|
|
30
|
+
| Account | **Starring** | **Read and write** | 列自己的 star 一般可读;**加/取消 star 必须 write** |
|
|
31
|
+
|
|
32
|
+
Repository access 优先仅选本次具名仓库;只有明确需要账号全量覆盖且用户同意时才选择 `All repositories`。只读盘点不要同时要求归档、删除、star 的写权限。
|
|
33
|
+
|
|
34
|
+
Classic PAT(https://github.com/settings/tokens ):
|
|
35
|
+
|
|
36
|
+
| scope | 用途 |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `public_repo` 或 `repo` | 读/写公开仓;`repo` 含私有 |
|
|
39
|
+
| `delete_repo` | 删除仓库(必须单独勾) |
|
|
40
|
+
| 无独立 starring scope | classic 的 `public_repo`/`repo` 通常已含 star |
|
|
41
|
+
|
|
42
|
+
## 改现有 token vs 新建
|
|
43
|
+
|
|
44
|
+
- **改现有 Fine-grained 权限**:token 字符串不变,`gh` 不用重新 login。用户保存后直接重试。
|
|
45
|
+
- **新建 token**:通过交互式 `gh auth login` 或受保护的 stdin/凭据管理器提供,不把 token 字面值拼进命令;然后,再 `gh auth status`。旧 token 不会自动换。
|
|
46
|
+
- 用过期日 + 前缀辨认「当前环境到底在用哪一条」。`Github-Authentication-Token-Expiration` 响应头是可靠标识。
|
|
47
|
+
|
|
48
|
+
辨认当前 token:过期时间、`github_pat_` 前缀、login。用户若改了另一条 token,这边会继续 403。
|
|
49
|
+
|
|
50
|
+
## 403 诊断
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
HTTP 403
|
|
54
|
+
X-Accepted-Github-Permissions: administration=write
|
|
55
|
+
message: Resource not accessible by personal access token
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
把 header 里的 permission 原样翻译给用户:
|
|
59
|
+
|
|
60
|
+
| header | 用户要开的项 |
|
|
61
|
+
|---|---|
|
|
62
|
+
| `administration=write` | Repository permissions → Administration → Read and write |
|
|
63
|
+
| `starring=write,metadata=read` | Account permissions → Starring → Read and write |
|
|
64
|
+
| `contents=write` | Repository permissions → Contents → Read and write |
|
|
65
|
+
|
|
66
|
+
`permissions.admin: true` 出现在 GET repo JSON 里,**不代表** 这个 PAT 能归档/删除。那是「你作为用户对该仓的角色」,不是 token 能力。
|
|
67
|
+
|
|
68
|
+
## 不要做的事
|
|
69
|
+
|
|
70
|
+
- 不要把 token 写入 skill、仓库、issue、gist。
|
|
71
|
+
- 不要用 `gh auth refresh` 去「升级」fine-grained PAT(交互式、且对 PAT 无效)。
|
|
72
|
+
- 不要在 403 时改删网页上的别的仓。
|
|
73
|
+
- GitHub 会自动吊销:推到公开仓/gist 的 token、一年未使用的 token。
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# 仓库盘点
|
|
2
|
+
|
|
3
|
+
## 列出自己的仓
|
|
4
|
+
|
|
5
|
+
全量盘点使用技能自带脚本,GraphQL cursor 自动分页,保留当前 token 可见范围:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
"$SKILL_DIR/scripts/inventory.sh"
|
|
9
|
+
"$SKILL_DIR/scripts/inventory.sh" --user LOGIN
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
过滤原创、fork、已归档仓在完整结果上进行;不要把固定 `--limit 200` 的截断列表称为全量。
|
|
13
|
+
`--stars` 始终列当前登录账号的星标,不随 `--user` 切换。分页中断时报部分结果,不忽略退出码。
|
|
14
|
+
|
|
15
|
+
JSON 字段不够时再打 API:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
gh api "repos/$ACCOUNT_LOGIN/$REPO_NAME" --jq '{open_issues_count,archived,disabled,has_pages,homepage,pushed_at}'
|
|
19
|
+
gh pr list -R "$ACCOUNT_LOGIN/$REPO_NAME" --state open --json number --jq length
|
|
20
|
+
gh run list -R "$ACCOUNT_LOGIN/$REPO_NAME" --limit 1 --json workflowName,status,conclusion,updatedAt
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`open_issues_count` **包含 PR**。要「真正的 issue」用 issues 数减去 open PR 数。
|
|
24
|
+
|
|
25
|
+
## 状态口径
|
|
26
|
+
|
|
27
|
+
按「今天」的日历算最近推送(`pushedAt`):
|
|
28
|
+
|
|
29
|
+
| 标签 | 口径 |
|
|
30
|
+
|---|---|
|
|
31
|
+
| 活跃 | 近 14 天有 push,且未归档 |
|
|
32
|
+
| 维护中 | 近 60 天有 push |
|
|
33
|
+
| 较静默 | 近 90 天有 push |
|
|
34
|
+
| 停滞 | 超过 90 天无 push |
|
|
35
|
+
| 已归档 | `isArchived=true` |
|
|
36
|
+
| 空仓 | `isEmpty=true` |
|
|
37
|
+
| Fork | `isFork=true`,表里写上游 `parent.owner.login/parent.name` |
|
|
38
|
+
|
|
39
|
+
Actions:最近一次 run 的 `conclusion`:success / failure / cancelled / 无 CI。
|
|
40
|
+
|
|
41
|
+
## 输出表(给用户)
|
|
42
|
+
|
|
43
|
+
自有仓:
|
|
44
|
+
|
|
45
|
+
| 仓库 | 类型 | 可见性 | 状态 | 语言 | 最近推送 | Stars | Issues/PR | Actions | 说明 |
|
|
46
|
+
|---|---|---|---|---|---|---|---|---|---|
|
|
47
|
+
|
|
48
|
+
Star 列表另表,见 `03-stars.md`。
|
|
49
|
+
|
|
50
|
+
## 只读脚本
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
"$SKILL_DIR/scripts/inventory.sh"
|
|
54
|
+
"$SKILL_DIR/scripts/inventory.sh" --stars
|
|
55
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# 归档与删除
|
|
2
|
+
|
|
3
|
+
官方文档:
|
|
4
|
+
|
|
5
|
+
- 归档:https://docs.github.com/en/repositories/archiving-a-github-repository/archiving-repositories
|
|
6
|
+
- 删除:https://docs.github.com/en/repositories/creating-and-managing-repositories/deleting-a-repository
|
|
7
|
+
- 恢复已删仓:https://docs.github.com/en/repositories/creating-and-managing-repositories/restoring-a-deleted-repository
|
|
8
|
+
|
|
9
|
+
## 归档
|
|
10
|
+
|
|
11
|
+
效果:仓库变只读。Issues、PR、代码、wiki、release、权限都冻结。他人仍可 fork、star、搜索。协作者不能再被添加或移除。
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
gh repo archive OWNER/REPO --yes
|
|
15
|
+
# 等价
|
|
16
|
+
gh api -X PATCH repos/OWNER/REPO -F archived=true --jq '{name,archived}'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
取消归档:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
gh api -X PATCH repos/OWNER/REPO -F archived=false --jq '{name,archived}'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
网页:`https://github.com/OWNER/REPO/settings` → Danger Zone → Archive。
|
|
26
|
+
|
|
27
|
+
适合:自己的原创仓、还有 star/历史价值、暂时不维护。不适合:确定要灭迹的实验 fork(走删除)。
|
|
28
|
+
|
|
29
|
+
## 删除
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
gh repo delete OWNER/REPO --yes
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
网页:Settings → Danger Zone → Delete this repository,输入仓名确认。
|
|
36
|
+
|
|
37
|
+
后果:
|
|
38
|
+
|
|
39
|
+
- 公有仓的 fork **不会**随删除消失。
|
|
40
|
+
- 私有仓的 fork **会**一起删。
|
|
41
|
+
- 团队权限永久丢掉。
|
|
42
|
+
- 部分仓库可在删除后 90 天内恢复;非空 fork 网络等情况存在限制,GitHub Support 恢复支持还受付费计划条件限制。不能承诺一定可恢复。
|
|
43
|
+
- 同名 `OWNER/REPO` 可能被保留一段时间不能新建;若删前一周 Actions 用量或 clone 很高,名称组合可能被永久退役。
|
|
44
|
+
|
|
45
|
+
复核:先确认本次删除返回成功,再以同一账号读取应为 404;单独的 404 也可能表示不可见,不能作为删除成功的唯一证据。
|
|
46
|
+
|
|
47
|
+
适合:已被新仓替代的旧 fork、空仓、明确废弃的镜像。有 star 的原创仓默认归档。
|
|
48
|
+
|
|
49
|
+
## 选择
|
|
50
|
+
|
|
51
|
+
| 情况 | 动作 |
|
|
52
|
+
|---|---|
|
|
53
|
+
| 原创、有 star 或有文档价值、不再开发 | 归档 |
|
|
54
|
+
| 上游已迁走的 fork / 配套 docs | 删除 |
|
|
55
|
+
| 空仓、错 fork、一次性实验 | 删除 |
|
|
56
|
+
| 还在用 | 不动 |
|
|
57
|
+
| 不确定 | 只列入 hygiene 建议,等用户点名 |
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Star 列表与批量取消
|
|
2
|
+
|
|
3
|
+
Star 是**账号级**操作。Fine-grained PAT 要开 **Account permissions → Starring → Read and write**。只开了仓库 Administration 不能 unstar。
|
|
4
|
+
|
|
5
|
+
## 列出
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
gh api --paginate -H "Accept: application/vnd.github.star+json" user/starred \
|
|
9
|
+
--jq '.[] | [
|
|
10
|
+
.starred_at,
|
|
11
|
+
.repo.full_name,
|
|
12
|
+
(.repo.stargazers_count|tostring),
|
|
13
|
+
(.repo.language // "-"),
|
|
14
|
+
(if .repo.archived then "archived" else "active" end),
|
|
15
|
+
(if .repo.fork then "fork" else "orig" end),
|
|
16
|
+
(.repo.description // "")
|
|
17
|
+
] | @tsv'
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
给用户时按主题分组,每条一句话说明。标出 `OWNER == 当前 login` 的自有仓。
|
|
21
|
+
|
|
22
|
+
## 查询单个
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
gh api -X GET user/starred/OWNER/REPO
|
|
26
|
+
# 204 = 已 star;404 = 未 star
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 加 / 取消
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
gh api -X PUT user/starred/OWNER/REPO # star → 204
|
|
33
|
+
gh api -X DELETE user/starred/OWNER/REPO # unstar → 204;本来没 star → 404
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
用户给一批仓时:逐个调用,汇总 `ok / already_not_starred / fail`。任一 403 立刻停,报告 `X-Accepted-Github-Permissions`(通常是 `starring=write,metadata=read`)。
|
|
37
|
+
|
|
38
|
+
不要把 403 报成已取消。用 GET 复核。
|
|
39
|
+
|
|
40
|
+
## MCP
|
|
41
|
+
|
|
42
|
+
`github__unstar_repository` / `github__star_repository` 走的是 GitHub App/MCP 凭证,可能和 `gh` 不是同一权限集。一边 403 时试另一边;两边都 403 就让用户改 PAT 或 MCP 安装权限。
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# 仓库卫生方法
|
|
2
|
+
|
|
3
|
+
先盘点,再出**建议清单**,等用户点具名仓。不要自行扩大范围。
|
|
4
|
+
|
|
5
|
+
## 建议规则
|
|
6
|
+
|
|
7
|
+
1. **原创 + 近 60 天有 push** → 保留。
|
|
8
|
+
2. **原创 + 长期无 push + 有 star 或有文档** → 建议归档,不删。
|
|
9
|
+
3. **Fork,且自己已用新仓替代**(例如旧 RuoYi fork 已迁到自己的 monorepo)→ 建议删除。
|
|
10
|
+
4. **Fork,仅作上游跟踪、自己无独特提交** → 问用户:留着同步 / 删除。
|
|
11
|
+
5. **空仓、错 fork、一次性实验** → 建议删除。
|
|
12
|
+
6. **已归档** → 除非用户要灭迹,否则不动。
|
|
13
|
+
7. **CI 失败** 只报告,不当作删除理由。
|
|
14
|
+
8. **开放 PR 很多** 只报告积压,不当作删除理由。
|
|
15
|
+
|
|
16
|
+
## 建议清单格式
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
归档(可逆)
|
|
20
|
+
- OWNER/REPO — 原因
|
|
21
|
+
|
|
22
|
+
删除(不可逆)
|
|
23
|
+
- OWNER/REPO — 原因
|
|
24
|
+
|
|
25
|
+
保留
|
|
26
|
+
- OWNER/REPO — 原因
|
|
27
|
+
|
|
28
|
+
取消 star(与自有仓无关)
|
|
29
|
+
- OWNER/REPO — 原因
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
用户回复「按这份做」或点名子集后,再进入 archive / delete / stars-mutate。
|
|
33
|
+
|
|
34
|
+
## 执行顺序
|
|
35
|
+
|
|
36
|
+
1. 归档(失败也不影响删除)
|
|
37
|
+
2. 删除
|
|
38
|
+
3. unstar(独立权限,可单独做)
|
|
39
|
+
4. 逐项 API 复核
|
|
40
|
+
5. 再跑一次 `gh repo list` / star 列表,把新状态表给用户
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# 来源
|
|
2
|
+
|
|
3
|
+
本技能吸收官方文档、gh CLI、以及现有 GitHub 向 agent skill。那些 skill 偏 issue/PR/workflow;本技能偏**账号仓库生命周期**。
|
|
4
|
+
|
|
5
|
+
## GitHub 官方
|
|
6
|
+
|
|
7
|
+
- 归档:https://docs.github.com/en/repositories/archiving-a-github-repository/archiving-repositories
|
|
8
|
+
- 删除:https://docs.github.com/en/repositories/creating-and-managing-repositories/deleting-a-repository
|
|
9
|
+
- 恢复已删仓:https://docs.github.com/en/repositories/creating-and-managing-repositories/restoring-a-deleted-repository
|
|
10
|
+
- PAT:https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
|
|
11
|
+
- Fine-grained 权限与 REST 对照:https://docs.github.com/en/rest/authentication/permissions-required-for-fine-grained-personal-access-tokens
|
|
12
|
+
- Token 过期与吊销:https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/token-expiration-and-revocation
|
|
13
|
+
- 凭证类型:https://docs.github.com/en/organizations/managing-programmatic-access-to-your-organization/github-credential-types
|
|
14
|
+
- Star REST:https://docs.github.com/en/rest/activity/starring
|
|
15
|
+
|
|
16
|
+
设置页:
|
|
17
|
+
|
|
18
|
+
- Fine-grained PAT:https://github.com/settings/personal-access-tokens
|
|
19
|
+
- 新建 Fine-grained:https://github.com/settings/personal-access-tokens/new
|
|
20
|
+
- Classic PAT:https://github.com/settings/tokens
|
|
21
|
+
|
|
22
|
+
## gh CLI
|
|
23
|
+
|
|
24
|
+
- 手册:https://cli.github.com/manual/
|
|
25
|
+
- `gh repo archive` / `gh repo delete` / `gh repo list`
|
|
26
|
+
- `gh api`、`gh api graphql`
|
|
27
|
+
- `gh skill`(安装/发布 agent skills,不是管仓库卫生):https://github.blog/changelog/2026-04-16-manage-agent-skills-with-github-cli/
|
|
28
|
+
|
|
29
|
+
## 同类 skill(参考,不替代本技能)
|
|
30
|
+
|
|
31
|
+
- `shalomb/agent-skills` → `skills/github-cli`:通用 gh,强调 **不要猜 flag**,复杂操先读 reference。偏 issue/PR/Actions/GraphQL。
|
|
32
|
+
- `odyssey4me/agent-skills` → `skills/github`:`gh` + 只读 Python 包装;写操作直接 `gh`。偏 issue/PR/workflow。
|
|
33
|
+
- Agent Skills 规范:https://agentskills.io/specification
|
|
34
|
+
- `gh skill` 跨 Copilot / Claude Code / Cursor / Codex 安装:GitHub CLI v2.90+
|
|
35
|
+
|
|
36
|
+
## 方法要点(从官方 + 实操)
|
|
37
|
+
|
|
38
|
+
- 规划与执行分开(破坏性清单必须用户点名)。
|
|
39
|
+
- Fine-grained:归档/删除 = Repository **Administration=write**;star = Account **Starring=write**。二者独立。
|
|
40
|
+
- 403 以 `X-Accepted-Github-Permissions` 为准,不以 GET repo 的 `permissions.admin` 为准。
|
|
41
|
+
- 改同一条 PAT 的权限后无需重新 `gh auth login`;新建 PAT 必须换 token。
|
|
42
|
+
- 删除公有仓不删别人的 fork;约 90 天可申请恢复。
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Read-only inventory of the authenticated GitHub user's repos and optional stars.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
usage() {
|
|
6
|
+
echo "usage: inventory.sh [--stars] [--user LOGIN]" >&2
|
|
7
|
+
exit 2
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
STARS=0
|
|
11
|
+
ACCOUNT_LOGIN=""
|
|
12
|
+
while [[ $# -gt 0 ]]; do
|
|
13
|
+
case "$1" in
|
|
14
|
+
--stars) STARS=1; shift ;;
|
|
15
|
+
--user) [[ $# -ge 2 && -n "$2" && "$2" != -* ]] || usage; ACCOUNT_LOGIN="$2"; shift 2 ;;
|
|
16
|
+
-h|--help) usage ;;
|
|
17
|
+
*) usage ;;
|
|
18
|
+
esac
|
|
19
|
+
done
|
|
20
|
+
|
|
21
|
+
if [[ -z "$ACCOUNT_LOGIN" ]]; then
|
|
22
|
+
ACCOUNT_LOGIN=$(gh api user --jq .login)
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
echo "# owner=$ACCOUNT_LOGIN"
|
|
26
|
+
echo "# repos"
|
|
27
|
+
printf '%s\n' "name visibility archived fork empty pushed stars lang url description"
|
|
28
|
+
gh api graphql --paginate -f login="$ACCOUNT_LOGIN" -f query='
|
|
29
|
+
query($login: String!, $endCursor: String) {
|
|
30
|
+
repositoryOwner(login: $login) {
|
|
31
|
+
repositories(first: 100, after: $endCursor, ownerAffiliations: OWNER) {
|
|
32
|
+
nodes { name visibility isArchived isFork isEmpty pushedAt stargazerCount primaryLanguage { name } url description }
|
|
33
|
+
pageInfo { hasNextPage endCursor }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}' \
|
|
37
|
+
--jq '.data.repositoryOwner.repositories.nodes[] | [
|
|
38
|
+
.name,
|
|
39
|
+
.visibility,
|
|
40
|
+
(if .isArchived then "archived" else "active" end),
|
|
41
|
+
(if .isFork then "fork" else "orig" end),
|
|
42
|
+
(if .isEmpty then "empty" else "has-code" end),
|
|
43
|
+
(.pushedAt // "-"),
|
|
44
|
+
(.stargazerCount|tostring),
|
|
45
|
+
((.primaryLanguage.name) // "-"),
|
|
46
|
+
.url,
|
|
47
|
+
((.description // "") | gsub("\t";" ") | gsub("\n";" "))
|
|
48
|
+
] | @tsv'
|
|
49
|
+
|
|
50
|
+
if [[ "$STARS" -eq 1 ]]; then
|
|
51
|
+
echo
|
|
52
|
+
echo "# stars"
|
|
53
|
+
printf '%s\n' "starred_at full_name stars lang archived fork description"
|
|
54
|
+
gh api --paginate -H "Accept: application/vnd.github.star+json" user/starred \
|
|
55
|
+
--jq '.[] | [
|
|
56
|
+
.starred_at,
|
|
57
|
+
.repo.full_name,
|
|
58
|
+
(.repo.stargazers_count|tostring),
|
|
59
|
+
(.repo.language // "-"),
|
|
60
|
+
(if .repo.archived then "archived" else "active" end),
|
|
61
|
+
(if .repo.fork then "fork" else "orig" end),
|
|
62
|
+
((.repo.description // "") | gsub("\t";" ") | gsub("\n";" "))
|
|
63
|
+
] | @tsv'
|
|
64
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ting'an Wang
|
|
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.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vscode-fullstack
|
|
3
|
+
description: 整理 VS Code 本机与 Remote SSH/WSL/Container 的 Profile、扩展和 JSONC 设置,复用已有 Java/Maven、Go、Node、Python 与 Vue/React 开发环境。用于工具找不到、重复下载或本地远程配置不一致;保留项目版本与用户定制,不接管应用开发或系统运行时安装。
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires access to the actual VS Code/Insiders/Remote host and its supported CLI or UI; extension installation needs approved network access.
|
|
6
|
+
metadata:
|
|
7
|
+
author: NAMEWTA
|
|
8
|
+
wta-format-reviewed: '2026-10-14'
|
|
9
|
+
---
|
|
10
|
+
# VS Code 全栈 Profile
|
|
11
|
+
|
|
12
|
+
## 输入与输出契约
|
|
13
|
+
|
|
14
|
+
先确定实际可访问的机器、产品、活动 Profile、扩展主机、所需语言和只读/修改模式。仅配置一个 Profile 时不扩大到全部;用户要求整体统一时,盘点相关 Profile,选主用基线并保留旧项和项目特例,不把“整理”解释成批量删除。
|
|
15
|
+
|
|
16
|
+
沿用本次会话已确认的目标和授权,不重复询问已决定的事项。仅对影响结果而无法推断的选择补问,例如主用 Profile 或是否改变项目的 Wrapper 策略;等待期间继续只读盘点。未使用的语言不整套安装。
|
|
17
|
+
|
|
18
|
+
交付主机/Profile/设置作用域清单、实际变更及保留冲突、工具入口与版本、备份/回滚方法和逐层验收结果。无法访问的客户端给出具体步骤和待验收项,不宣称已配置成功。
|
|
19
|
+
|
|
20
|
+
“Ubuntu 本地和 Windows Remote SSH 都使用现有 Java、Go、Node”或“给当前 Profile 补 Python/Vue,保留 formatter”应进入本技能;“给 React 页面添加登录表单”不应进入。
|
|
21
|
+
|
|
22
|
+
## 先盘点,再形成差异
|
|
23
|
+
|
|
24
|
+
1. 确认 Stable/Insiders/便携版、系统/架构、实际 CLI 和 Server 版本;用 `--version`、`--help` 及活动窗口验证能力。区分客户端与执行代码的主机,不将容器当用户电脑,不因两个目录的 Profile 同名就认定已同步。
|
|
25
|
+
2. 读取目标设置、工作区覆盖、扩展 ID/版本/启用状态及已有项目版本选择机制。多端统一或调整默认 Profile 时先读 [Profile、作用域与验收](references/profiles-and-validation.md)。
|
|
26
|
+
3. 涉及已有工具发现、重复下载或项目版本时,读 [运行时复用](references/runtime-reuse.md),比较 shell、扩展宿主、集成终端和调试器实际入口,不能只凭路径存在判断可用。
|
|
27
|
+
4. 按 [扩展与设置](references/extensions-and-settings.md) 选择缺失能力,列出每项新增/修改/删除、目标作用域和理由;用户的 formatter、解释器、片段和禁用选择优先。
|
|
28
|
+
|
|
29
|
+
扩展、工具下载及联网文档核对须在宿主允许及用户任务授权范围内;说明目标服务可见的请求信息,不上传配置、凭据或项目内容。离线任务使用本地清单和已核验缓存,缺少能力时明确报告。
|
|
30
|
+
|
|
31
|
+
## 备份后最小修改
|
|
32
|
+
|
|
33
|
+
使用每轮独立的私有备份目录,记录原文件内容、原先不存在、权限、摘要,以及扩展版本/启用状态、Profile 和工作区关联。先预览差异;写前比较基线,发现并发编辑先重新合并。具体回滚边界见 [备份与回滚](references/profiles-and-validation.md#备份与回滚)。
|
|
34
|
+
|
|
35
|
+
`settings.json` 按 JSONC 处理:用可靠解析器的增量编辑或精确补丁加解析校验,保留注释、尾逗号和无关键,拒绝无效输入,不自制正则解析器或严格 JSON 整文件重排。对象按键合并;仅对集合型数组去重合并,保留 PATH 等有序配置的语义。已有冲突默认保留并报告;明确属于用户授权的统一目标时才定向修正。
|
|
36
|
+
|
|
37
|
+
通过受支持的 CLI/UI 创建、选择、关联 Profile 和安装扩展。不得手写内部数据库、扩展注册表或复制/共享扩展目录模拟安装。安装前检查扩展包成员和必要依赖,安装后重新比对清单;锁定扩展包版本不等于锁定依赖。
|
|
38
|
+
|
|
39
|
+
复用现有语言运行时与项目选择入口;必要的缺失辅助工具(如 gopls、Delve)按兼容性和已授权下载范围补齐,不隐式升级语言运行时。不重写项目规范或系统全局环境,不为通过测试关闭 Workspace Trust、TLS 或签名验证。
|
|
40
|
+
|
|
41
|
+
目标不明、权限拒绝、配置损坏、版本不兼容或来源无法验证时停止相关写入,保留可完成的独立工作及具体阻碍;安装失败按有限次数重试,只终止本任务启动的进程树。没有新证据不反复重装、清缓存或扩大权限。
|
|
42
|
+
|
|
43
|
+
## 验收
|
|
44
|
+
|
|
45
|
+
按改动范围逐层检查:配置读回及重复执行无差异 → 运行时版本/最小样例 → 实际扩展宿主的补全、诊断、格式化或调试 → 各客户端连接。完整环境统一按 [验收分层](references/profiles-and-validation.md#验收分层) 执行;小范围设置变更只运行相关检查。
|
|
46
|
+
|
|
47
|
+
报告明确区分静态读回、命令行运行、隔离编辑器验证、真实业务项目与真实 Remote 会话。旧日志、目录里存在扩展、设置写入或 Settings Sync 成功都不能代替激活与功能证据。保留失败与复测记录;缺少 GUI/客户端时标为待验证。
|