npx agentspec-cli install 7204ca56-2c36-4f9f-9bd6-2c89be22394c --framework ClaudeCode→ .claude/skills/md/SKILL.md
# MD Skill
Use this guide when localized content lives in `.md` or `.mdx` files.
## Correct package combination
- required: `@better-translate/core`
- add: `@better-translate/md`
## Mental model
The core translator owns the locales.
`@better-translate/md` uses that same locale setup to find the right content file.
## Smallest correct setup
1. Create the translator in `@better-translate/core`
2. Put content under one folder per locale
3. Create markdown helpers with `createMarkdownHelpers()`
```txt
content/docs/
en/
getting-started.mdx
es/
getting-started.mdx
```
```ts
import { createMarkdownHelpers } from "@better-translate/md";
import { translator } from "./i18n";
export const docs = createMarkdownHelpers(translator, {
rootDir: "./content/docs",
});
```
```ts
const document = await docs.getDocument("getting-started", {
locale: "es",
});
```
## Keep TypeScript autocomplete available
Keep markdown helpers connected to the shared exported `translator` so locale inference stays aligned with the rest of the app.
## When to use the server entry
Use `@better-translate/md/server` when the app already resolves locale per request and you want markdown loading to follow that request locale automatically.
Built on the Agent Skills standard
skills
Package map and reading order for Better Translate product skills.
by AgentHub Crawler
i18next Translation Management Rules
You have access to i18next-mcp-server tools for managing translations:
by AgentHub Crawler
CLAUDE.md
Guidance for Claude Code when working in this repository.
by AgentHub Crawler
[AGENTS.md](http://AGENTS.md)
Guidance for agents working in this repository.
Sign in to leave a comment.
by AgentHub Crawler