Hns Moaiadk Best Practices logo

Hns Moaiadk Best Practices

OrganizationPopular
modu-ai
hns-moaiadk-best-practices

moai-adk-go best-practices reference for the 4 harness specialists (cli-template-specialist, quality-specialist, workflow-specialist, hook-ci-specialist). Covers TRUST 5 gates, Go test isolation (t.TempDir, no OTEL env in parallel tests), hardcoding-prevention rules (env constants in envkeys.go, thresholds in defaults.go), the AskUserQuestion orchestrator-only boundary, the deferred-tool preload rule, the archived-agent rejection contract, and verification-claim integrity. Loaded by the specialists when authoring or reviewing moai-adk-go code.

Overview

Publishermodu-ai
Repositorymoai-adk
Skill namehns-moaiadk-best-practices
Stars
1.2K
Forks
226
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by modu-ai on GitHub. Read the source before you install it.

Installation

Install the Hns Moaiadk Best Practices AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/hns-moaiadk-best-practices
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/modu-ai/moai-adk.git /tmp/moai-adk
mkdir -p .claude/skills
cp -r /tmp/moai-adk/.claude/skills/hns-moaiadk-best-practices .claude/skills/hns-moaiadk-best-practices
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Hns Moaiadk Best Practices in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Hns Moaiadk Best Practices on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Hns Moaiadk Best Practices is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

moai-adk-go Best Practices

TRUST 5 Quality Gates

Every change must pass all five dimensions before completion:

PillarGateFailure action
Testedgo test ./... with coverageBlock merge; generate missing tests
Readablegolangci-lint runWarn; suggest refactoring
Unifiedgo fmt + goimportsAuto-format or warn
SecuredOWASP-aligned review (per-spawn opus agent)Block; require review
TrackableConventional Commits regexSuggest format

Coverage targets: 85% package minimum; 90%+ for critical packages (internal/cli, internal/template, internal/hook).

Test Isolation

  • Always t.TempDir() for temp dirs — auto-cleanup, under os.TempDir().
  • macOS path pitfall: t.TempDir() returns /var/folders/.... Go's filepath.Join(cwd, absPath) does NOT strip the leading /: filepath.Join("/a/b", "/var/folders/x") → "/a/b/var/folders/x" (WRONG). Use filepath.Abs() when resolving user-supplied paths in CLI commands.
  • No OTEL env in parallel tests (CLAUDE.local.md §WARN): never t.Setenv("OTEL_EXPORTER_*", ...) in parallel tests — the OTEL SDK initializes global state from env vars on first use, causing data races. Use a fake/no-op exporter instead; or make the parent test non-parallel.
  • No t.Setenv("HOME", tmpDir) in GLM integration tests — parallel-test pollution. Use t.TempDir() + explicit path construction.
  • After fixing any test, run the FULL suite (go test ./...) to catch cascading failures. Use -count=1 to disable caching when debugging flaky tests; use -race for concurrency-safety checks.

Hardcoding Prevention

  • URLs / model names / org names / API headers → extract to const.
  • Environment variable names → define in internal/config/envkeys.go as constants; reference the constant everywhere. Never inline a raw env string.
  • Thresholds → single source in internal/config/defaults.go. Never duplicate a threshold across packages.
  • Cross-platform paths → prefer $HOME, HOMEBREW_PREFIX, etc. In .sh.tmpl fallback paths use $HOME (not .HomeDir), because .HomeDir freezes at moai init time and breaks for users with non-standard layouts.
  • Hardcoding allowed only in CLAUDE.local.md, settings.local.json, and _test.go files inside t.TempDir().

AskUserQuestion Boundary (orchestrator-only)

  • AskUserQuestion is the ONLY user-facing question channel, and it is reserved for the MoAI orchestrator (main session).
  • Subagents (including these harness specialists) MUST NOT invoke AskUserQuestion. If user input is required, return a structured blocker report to the orchestrator (see .claude/rules/moai/core/askuser-protocol.md § Blocker Report Format).
  • Deferred-tool preload: AskUserQuestion, TaskCreate, TaskUpdate, TaskList, TaskGet are deferred tools — schema not loaded at session start. The orchestrator MUST call ToolSearch(query: "select:AskUserQuestion,TaskCreate,...") before first use. Subagents inherit this constraint.
  • Free-form prose questions in response text are prohibited — always route through AskUserQuestion (orchestrator) or a blocker report (subagent).

Archived-Agent Rejection Contract

12 agents are ARCHIVED and MUST NOT be referenced anywhere in generated harness files — no delegates-to, no prose, no examples. The full list of archived names lives in the canonical SSOT at .claude/rules/moai/workflow/archived-agent-rejection.md §B; this skill does not repeat the literal names (repeating them in every generated file would re-seed the exact tokens the rejection contract is meant to suppress).

The 8 RETAINED agents are the only valid delegation targets:

manager-spec, manager-develop, manager-docs, manager-git,
plan-auditor, sync-auditor, builder-harness, Explore (Anthropic built-in)

For domain expertise formerly provided by the archived domain-expert agents, use the per-spawn pattern: Agent(subagent_type: "general-purpose", tools: "<whitelist>", prompt: "...<domain> specialist: <conventions>...") at delegation time. See .claude/rules/moai/workflow/archived-agent-rejection.md §C for the full migration table (rows #1-#12), which maps each archived agent to its canonical retained-agent or per-spawn replacement.

Verification-Claim Integrity

Per .claude/rules/moai/core/verification-claim-integrity.md:

  • No unobserved claims. A "tests pass" / "coverage 87%" / "lint clean" assertion is valid ONLY when the actor ran the command and observed the output. An unran command is a gap, never a pass.
  • No unobserved defect claims. Inferring a defect/debt/drift from frontmatter text or grep matches alone — without the domain's dedicated tool (moai spec audit, go test -cover, golangci-lint) — is a hypothesis, not a verified defect. The 2026-06-17 incident (29 SPECs wrongly flagged as "Mx-close debt"; moai spec audit showed all 29 were grandfather-protected) is the canonical worked example.
  • Baseline attribution. Every verification claim names the command run + the verbatim output observed, measured against this tree in this run. A number from a different SPEC/package/time is a carry-over, not a baseline.
  • 5-section report format: Claim / Evidence / Baseline-attribution / Gaps / Residual-risk. The Gaps section is the defense — force yourself to enumerate what was NOT observed.

Cross-References

  • CLAUDE.local.md §6 (testing), §14 (hardcoding), §19 (AskUserQuestion)
  • .claude/rules/moai/core/verification-claim-integrity.md v1.1.0
  • .claude/rules/moai/core/askuser-protocol.md
  • .claude/rules/moai/workflow/archived-agent-rejection.md
  • .claude/rules/moai/development/coding-standards.md

Frequently asked questions

What does the Hns Moaiadk Best Practices AI skill do?

moai-adk-go best-practices reference for the 4 harness specialists (cli-template-specialist, quality-specialist, workflow-specialist, hook-ci-specialist). Covers TRUST 5 gates, Go test isolation (t.TempDir, no OTEL env in parallel tests), hardcoding-prevention rules (env constants in envkeys.go, thresholds in defaults.go), the AskUserQuestion orchestrator-only boundary, the deferred-tool preload rule, the archived-agent rejection contract, and verification-claim integrity. Loaded by the specialists when authoring or reviewing moai-adk-go code.

Why use Hns Moaiadk Best Practices on TypingMind?

Because you install it once and use it with any model. Hns Moaiadk Best Practices is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Hns Moaiadk Best Practices in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/hns-moaiadk-best-practices. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Hns Moaiadk Best Practices?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Hns Moaiadk Best Practices?

As many as you like. As long as a model supports skills, you can use Hns Moaiadk Best Practices with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Hns Moaiadk Best Practices AI skill free?

Yes. It is published on GitHub by modu-ai under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇