AI Development¶
asmysql provides development support for AI coding assistants (Claude Code / Cursor / Qoder / Codex, etc.): a user-level development skill (usage quickref + pitfall guide + doc map) and LLM-friendly plain-text documentation entries, so AI finds correct usage on first contact with asmysql and avoids high-frequency pitfalls.
Three Ways to Use¶
Option 1: One-Command Skill Install (Recommended)¶
Run at your project root (--target is required; project-level preferred):
--target values:
| Value | Scope | Behavior |
|---|---|---|
claude / cursor |
Project | Canonical ./.agents/skills/asmysql-dev/ + per-skill symlink in the tool directory |
agents |
Project | Install the canonical only, no symlinks |
user:claude / user:cursor / user:agents |
User | Same layout, rooted at ~/ |
all / user:all |
Project / User | Canonical install + symlinks only into existing tool directories (missing ones never created) |
| Any path | Custom | Expands ~; under a project with existing .agents/skills/ reuses its canonical + symlink, otherwise the entity lands directly in the custom directory |
Comma-separated multi-targets are supported (e.g. --target claude,user:cursor). The install model is "single canonical + per-skill symlinks": one entity per scope (with a version stamp), shared by tool-directory symlinks; symlink failure falls back to an entity copy. Existing targets are skipped by default; after upgrading asmysql, refresh with --force:
Option 2: Manual Download¶
Download asmysql-dev-skill.zip and extract it into your tool's skills directory (e.g. .claude/skills/), keeping the top-level asmysql-dev/ directory structure.
Option 3: Zero-Install Online Reading¶
Install nothing; let the AI read the online files directly:
- Skill main file: https://vastxiao.github.io/asmysql/ai/skill/SKILL.md
- Documentation index: https://vastxiao.github.io/asmysql/ai/llms.txt
AI Discovery Entries¶
Whichever touchpoint brings AI to asmysql first, an AI development entry is available:
| Touchpoint | Entry |
|---|---|
| PyPI page | The "AI-Assisted Development" section in README |
| Installed package source | asmysql/__init__.py module docstring and asmysql/_ai/AGENTS.md |
| Documentation site | Root /llms.txt pointer, /ai/llms.txt, and this page |
| Repository source | User-level skill guidance in .agents/AGENTS.md |
llms.txt Documentation Entries¶
- llms.txt: LLM-friendly plain-text index with a one-line summary per page; AI fetches individual pages on demand;
- llms-full.txt: concatenated full Chinese docs, read in one go when complete context is needed;
- The root pointer llms.txt always points to the latest
/ai/llms.txt.
AI assets live under the site root /ai/, version-independent and always up to date; historical skill versions ship with older wheels.
Skill Coverage and Version Matching¶
Skill content: version self-check gate, v2 core usage quickref (Engine/AsMysql/Result), high-frequency pitfall list (Result is not awaitable, error checking, streaming reads, commit semantics, event-loop constraints), and a doc map.
The skill ships with the package version and matches the installed asmysql version:
- A version stamp
.asmysql-skill.jsonis written at install time; - A mandatory version self-check runs before using the skill: if the stamp mismatches the installed package version (or is absent), it switches to the in-package skill (locate via
python -m asmysql skill path) or the latest online version, so stale copies never mislead silently; - After upgrading asmysql, run
python -m asmysql skill install --target <original-target> --forceto refresh.