Agent Skillsmodu-ai/moai-adk › hns-moaiadk-dev-reference

hns-moaiadk-dev-reference

GitHub

提供moai-adk-go本地开发参考,涵盖版本管理、发布流程、Shell Hook开发及构建命令。用于特定任务时加载以节省上下文。

.claude/skills/hns-moaiadk-dev-reference/SKILL.md modu-ai/moai-adk

Trigger Scenarios

执行版本管理与发布流程 开发或调试Shell脚本Hook 执行项目构建与测试命令

Install

npx skills add modu-ai/moai-adk --skill hns-moaiadk-dev-reference -g -y
More Options

Non-standard path

npx skills add https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/hns-moaiadk-dev-reference -g -y

Use without installing

npx skills use modu-ai/moai-adk@hns-moaiadk-dev-reference

指定 Agent (Claude Code)

npx skills add modu-ai/moai-adk --skill hns-moaiadk-dev-reference -a claude-code -g -y

安装 repo 全部 skill

npx skills add modu-ai/moai-adk --all -g -y

预览 repo 内 skill

npx skills add modu-ai/moai-adk --list

SKILL.md

Frontmatter
{
    "name": "hns-moaiadk-dev-reference",
    "description": "moai-adk-go local dev reference — version management\/release process (sec 5), shell-script hook development (sec 7), build & dev commands (sec 10). Load only when performing these specific tasks."
}

hns-moaiadk-dev-reference

moai-adk-go 로컬 dev 레퍼런스 — CLAUDE.local.md §5/§7/§10 의 작업 특화 상세를 이곳으로 이관 (lazy-load). 세션마다 필요 없는 참고 자료. 항상-로드 컨텍스트 절감용. 소유: hns-* 네임스페이스 (user-owned, moai update 보존 — CLAUDE.local.md §24). 템플릿 미러 금지.


Version Management (from CLAUDE.local.md §5)

Single Source of Truth

  • [HARD] go.mod module version + git tags are the authoritative sources
  • [HARD] pkg/version/version.go reads from git tags at build time

Version Reference:

  • Authoritative Source: Git tags (e.g., v1.0.0)
  • Runtime Access: pkg/version/version.go via git describe
  • Config Display: .moai/config/sections/system.yaml (updated by release process)

Build Version Injection

Version is injected at build time using ldflags:

# Build with version injection
go build -ldflags="-X github.com/modu-ai/moai-adk/pkg/version.Version=v1.0.0"

# Makefile handles this automatically
make build VERSION=1.0.0

Files Requiring Version Sync

When releasing new version, update:

Documentation Files:

  • README.md (Version line)
  • README.ko.md (Version line)
  • CHANGELOG.md (New version entry)

Configuration Files:

  • .moai/config/sections/system.yaml (moai.version)
  • internal/template/templates/.moai/config/sections/system.yaml.tmpl (moai.version)

Release Process

  1. Update CHANGELOG.md with new version entry
  2. Create git tag: git tag v1.0.0
  3. Push tag: git push origin v1.0.0
  4. Build release binaries: make release VERSION=1.0.0

Hook Development (from CLAUDE.local.md §7)

[HARD] Shell Script Hooks Only

moai-adk-go uses shell scripts for hooks, NOT Python:

Hook Wrapper Pattern:

#!/bin/bash
# .claude/hooks/moai/handle-session-start.sh

# Read stdin JSON from Claude Code
INPUT=$(cat)

# Call moai binary with hook subcommand
moai hook session-start <<< "$INPUT"

Why Shell Scripts:

  • Faster execution (no Python startup overhead)
  • Always available (no dependency on uv/python)
  • Cross-platform (bash, /bin/sh)

Hook Command Format

settings.json hook configuration:

{
  "hooks": {
    "SessionStart": [{
      "hooks": [{
        "command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/moai/handle-session-start.sh\"",
        "timeout": 5
      }]
    }]
  }
}

Key Rules:

  • [HARD] Always quote $CLAUDE_PROJECT_DIR: "$CLAUDE_PROJECT_DIR"
  • [HARD] Use full path to hook wrapper script
  • [HARD] Set appropriate timeout. MoAI policy default is 5 seconds (the Claude Code platform default is 10 minutes; MoAI tightens this to 5 seconds to avoid stalling the session).

Platform Differences

macOS/Linux:

"command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/moai/hook.sh\""

Windows:

"command": "\"%CLAUDE_PROJECT_DIR%\\.claude\\hooks\\moai\\hook.sh\""

Build & Dev Commands (from CLAUDE.local.md §10)

Common Commands

# Build the project
make build

# Run tests
make test

# Run with race detection
make test-race

# Run linter
make lint

# Format code
make fmt

# Install locally
make install

# Clean build artifacts
make clean

# Run go fix modernizers
make fix

Development Workflow

# 1. Edit templates
vim internal/template/templates/.claude/skills/moai/SKILL.md

# 2. Regenerate embedded files
make build

# 3. Run tests
go test ./internal/template/...

# 4. Test locally
./moai init test-project

# 5. Commit
git add internal/template/templates/
git commit -m "feat(template): update SKILL.md"

Version History

  • 4100d87 Current 2026-08-20 09:07

Same Skill Collection

.claude/skills/hns-lsel-curator/SKILL.md
.claude/skills/hns-oss-docs-i18n-rules/SKILL.md
.claude/skills/hns-oss-docs-readme-sync/SKILL.md
.claude/skills/hns-oss-docs-structure-map/SKILL.md
.claude/skills/hns-oss-docs-verify/SKILL.md
.claude/skills/hns-workflow-ci-loop/SKILL.md
.claude/skills/moai-domain-backend/SKILL.md
.claude/skills/moai-domain-database/SKILL.md
.claude/skills/moai-domain-frontend/SKILL.md
.claude/skills/moai-domain-humanize/SKILL.md
.claude/skills/moai-domain-svg-infographic/SKILL.md
.claude/skills/moai-foundation-cc/SKILL.md
.claude/skills/moai-foundation-core/SKILL.md
.claude/skills/moai-foundation-quality/SKILL.md
.claude/skills/moai-foundation-thinking/SKILL.md
.claude/skills/moai-harness-learner/SKILL.md
.claude/skills/moai-kanban-foreman/SKILL.md
.claude/skills/moai-meta-harness/SKILL.md
.claude/skills/moai-ref-api-patterns/SKILL.md
.claude/skills/moai-ref-cross-model-audit/SKILL.md
.claude/skills/moai-ref-git-workflow/SKILL.md
.claude/skills/moai-ref-owasp-checklist/SKILL.md
.claude/skills/moai-ref-react-patterns/SKILL.md
.claude/skills/moai-ref-testing-pyramid/SKILL.md
.claude/skills/moai-ref-ui-polish/SKILL.md
.claude/skills/moai-workflow-ddd/SKILL.md
.claude/skills/moai-workflow-docs-claim-check/SKILL.md
.claude/skills/moai-workflow-loop/SKILL.md
.claude/skills/moai-workflow-project/SKILL.md
.claude/skills/moai-workflow-spec/SKILL.md
.claude/skills/moai-workflow-tdd/SKILL.md
.claude/skills/moai-workflow-testing/SKILL.md
.claude/skills/moai-workflow-worktree/SKILL.md
.claude/skills/moai/SKILL.md
.moai/archive/skills/v2.16/moai-framework-electron/SKILL.md
.moai/archive/skills/v2.16/moai-platform-auth/SKILL.md
.moai/archive/skills/v2.16/moai-platform-chrome-extension/SKILL.md
.moai/archive/skills/v2.16/moai-platform-deployment/SKILL.md
.moai/archive/skills/v3.0/moai-design-craft/SKILL.md
.moai/archive/skills/v3.0/moai-design-tools/SKILL.md
.moai/archive/skills/v3.0/moai-docs-generation/SKILL.md
.moai/archive/skills/v3.0/moai-domain-uiux/SKILL.md
.moai/archive/skills/v3.0/moai-foundation-context/SKILL.md
.moai/archive/skills/v3.0/moai-foundation-philosopher/SKILL.md
.moai/archive/skills/v3.0/moai-platform-database-cloud/SKILL.md
.moai/archive/skills/v3.0/moai-tool-svg/SKILL.md
.moai/archive/skills/v3.0/moai-workflow-jit-docs/SKILL.md
.moai/archive/skills/v3.0/moai-workflow-templates/SKILL.md
.moai/archive/skills/v3.0/moai-workflow-thinking/SKILL.md

Metadata

Files
0
Version
4100d87
Hash
fa9d6f8a
Indexed
2026-08-20 09:07

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-26 09:59
浙ICP备14020137号-1 $방문자$