label-context-mapping

建立 GitHub 标签与技能、上下文文档之间的动态映射关系,根据标签类型自动关联对应的任务背景文档、开发技能及验证流程,支撑问题创建与处理时的上下文加载与能力调用。

快捷安装

在终端运行此命令,即可一键安装该 Skill 到您的 Claude 中

npx skills add hiromaily/go-crypto-wallet --skill "label-context-mapping"

Label → Context Mapping

Central mapping from GitHub labels to Skills and Context documents.

SSOT: This skill defines the operational mappings. Label definitions are in Task Classification.

When to Use

  • Creating issues: Determine which labels to apply
  • Working on issues: Determine which skills and contexts to load

Label Categories

Type Labels → Context Documents

LabelContext Document
bugdocs/ai/task-contexts/bug-fix.md
enhancementdocs/ai/task-contexts/feature-add.md
refactoringdocs/ai/task-contexts/refactoring.md
documentationdocs/ai/task-contexts/documentation.md
securitydocs/ai/task-contexts/security.md
technical-debtdocs/ai/task-contexts/refactoring.md
testdocs/ai/task-contexts/test.md

Language Labels → Skills

LabelSkillVerification
lang:gogo-developmentmake go-lint && make tidy && make check-build && make go-test
lang:typescripttypescript-developmentSee skill for app-specific commands (Bun for xrpl-grpc-server, npm for eth-contracts)
lang:soliditysolidity-developmenttruffle compile && truffle test

Scope Labels → Skills

LabelSkillVerification
scope:docsdocs-updateMarkdown formatting
scope:devopsdevopsyamllint, workflow test
scope:scriptsshell-scriptsmake shfmt
scope:makefilemakefile-updatemake mk-lint
scope:dbdb-migration (+ go-development)make atlas-fmt && make atlas-lint && make sqlc
scope:config-Syntax validation
scope:proto-make proto

Chain Labels → Context Documents

LabelContext Documents
chain:btcdocs/ai/task-contexts/chain-specific.md, docs/chains/btc/README.md
chain:bchdocs/ai/task-contexts/chain-specific.md, docs/chains/bch/README.md
chain:ethdocs/ai/task-contexts/chain-specific.md, docs/chains/eth/README.md
chain:erc20docs/ai/task-contexts/chain-specific.md, docs/chains/eth/README.md
chain:xrpdocs/ai/task-contexts/chain-specific.md, docs/chains/xrp/README.md
chain:alldocs/ai/task-contexts/chain-specific.md

Test Scope Labels → Verification

LabelVerification
unit-testmake go-test
integration-testmake go-test-integration
e2e-testmake btc-e2e-* or chain-specific E2E

Loading Procedure

From Issue Labels

1. Parse issue labels
2. Load contexts:
   - Type label → Context document
   - Chain label → Chain context (if present)
3. Load skills:
   - Always: git-workflow
   - Lang/Scope label → Development skill
4. Apply verification commands from skill

Mapping Examples

LabelsSkills LoadedContexts Loaded
bug, lang:go, chain:btcgit-workflow, go-developmentbug-fix.md, chains/btc.md
enhancement, lang:typescript, chain:xrpgit-workflow, typescript-developmentfeature-add.md, chains/xrp.md
documentation, scope:docsgit-workflow, docs-updatedocumentation.md
refactoring, scope:db, lang:gogit-workflow, db-migration, go-developmentrefactoring.md, db-change.md
test, lang:go, unit-testgit-workflow, go-developmenttest.md
security, lang:gogit-workflow, go-developmentsecurity.md

Label Selection Rules

Required Labels

Every issue must have:

  1. One Type label (bug, enhancement, refactoring, documentation, security, technical-debt, test)
  2. One Language OR Scope label (lang:* or scope:*)

Optional Labels

  • Chain label: Only for cryptocurrency-specific code
  • Test Scope label: Only when Type is test

Quick Reference

Required: [Type] + [Language OR Scope]
Optional: [Test Scope] + [Chain]

Type label → Context document (what to do)
Lang/Scope label → Skill (how to do)
Chain label → Chain context (domain knowledge)
  • Task Classification SSOT - Label definitions
  • GitHub Labels - Label configuration
  • github-issue-creation - Uses this mapping for issue creation
  • fix-issue command - Uses this mapping for issue work