From flutter-dev-tools
Audit and generate per-skill README.md, sync marketplace.json, plugin.json, and README files, then commit and push to remote. Also syncs changes to local Claude Code plugins directory.
How this skill is triggered — by the user, by Claude, or both
Slash command
/flutter-dev-tools:update-remote-pluginsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **中文环境要求**
中文环境要求
本技能运行在中文环境下,请遵循以下约定:
- 面向用户的回复、注释、提示信息必须使用中文
- AI 内部处理过程可以使用英文
- 所有生成的文件必须使用 UTF-8 编码
Audit and generate per-skill README.md files, sync marketplace.json with plugins directory, update both English and Chinese README files, then commit and push to remote. Finally, sync to local Claude Code plugins directory.
plugins/ directory/fdt:update-remote-plugins
ALWAYS start by pulling latest changes to avoid conflicts:
git fetch origin
git pull --rebase
If pull fails due to uncommitted changes:
git stash
git pull --rebase
# After resolving any conflicts, restore stash if needed
List all skills in the plugin:
ls -1 plugins/flutter-dev-tools/skills/
For each skill, read its SKILL.md to get name and description.
Check if any file changed since last commit:
git diff HEAD --name-only -- plugins/
If changes detected, determine version bump:
在更新配置文件之前,确保每个 skill 目录都有最新的 README.md。
结合 Step 3 的变更检测结果,确定哪些 skill 需要处理:
# 获取变更的 skill 目录列表
# 路径格式: plugins/flutter-dev-tools/skills/{skill-name}/SKILL.md,skill-name 在第4段
CHANGED_SKILLS=$(git diff HEAD --name-only -- plugins/flutter-dev-tools/skills/ \
| cut -d'/' -f4 \
| sort -u)
需要审计的 skill:
扫描所有 skill 目录,检查 README.md 是否存在:
for skill_dir in plugins/flutter-dev-tools/skills/*/; do
skill_name=$(basename "$skill_dir")
if [ ! -f "${skill_dir}README.md" ]; then
echo "MISSING: ${skill_name}/README.md"
fi
done
对每个需要处理的 skill,读取其 SKILL.md 内容,提取以下信息并生成 README.md:
提取规则:
| README 字段 | SKILL.md 来源 |
|---|---|
| 标题 | frontmatter 中的 name 字段 |
| 一句话描述 | H1 标题后的第一段文字(翻译为中文) |
| 功能列表 | ## When to Use、## 功能概述 或其他功能描述段落(翻译为中文) |
| 用法 | ## Trigger、## Example Prompts、## 使用方法、## Command Parameters 等段落 |
README.md 模板:
# {skill-name}
{一句话中文描述}
---
## 功能
{功能列表,每项一行,以 - 开头}
## 用法
{用法示例,保留原始代码块格式}
---
> 本文档由 SKILL.md 自动生成,请勿手动编辑。如需更新,修改 SKILL.md 后运行 `/fdt:update-remote-plugins`。
关键规则:
确认每个 skill 目录现在都有 README.md:
for skill_dir in plugins/flutter-dev-tools/skills/*/; do
skill_name=$(basename "$skill_dir")
if [ ! -f "${skill_dir}README.md" ]; then
echo "ERROR: ${skill_name}/README.md 仍然缺失!"
else
echo "OK: ${skill_name}/README.md"
fi
done
如有缺失,重新生成。
plugin.json - Update version and description in plugins/flutter-dev-tools/.claude-plugin/plugin.json
CRITICAL: plugin.json MUST include skills field:
{
"name": "flutter-dev-tools",
"description": "...",
"version": "1.1.0",
"author": {...},
"skills": ["./skills/"]
}
Without skills field, Claude Code will NOT load any skills from the plugin.
marketplace.json - Update version in .claude-plugin/marketplace.json
README.md (Chinese) - Update skills table:
## 包含的 Skills
| Skill | 描述 |
|-------|------|
| `skill-name` | Description from SKILL.md |
...
README_EN.md (English) - Sync with Chinese version:
Stage and commit changes:
git add .claude-plugin/marketplace.json README.md README_EN.md plugins/flutter-dev-tools/
git commit -m "feat: 更新插件至 v{version} - {变更摘要}"
注意: Commit message 必须使用中文。
Push with retry logic:
# Try push, if fails due to remote changes, pull and retry
git push || {
git pull --rebase
# Resolve conflicts if any
git rebase --continue # or --abort if needed
git push
}
ALWAYS sync to BOTH cache AND marketplace directories - Claude Code reads from both locations.
# Determine target paths
VERSION=$(cat plugins/flutter-dev-tools/.claude-plugin/plugin.json | grep '"version"' | head -1 | cut -d'"' -f4)
# Cache path (primary)
CACHE_PATH="$HOME/.claude/plugins/cache/flutter-dev-tools/flutter-dev-tools/$VERSION"
# Marketplace path (git clone, NOT manual copy!)
MARKETPLACE_PATH="$HOME/.claude/plugins/marketplaces/flutter-dev-tools"
# === Sync to CACHE directory ===
mkdir -p "$CACHE_PATH/skills" "$CACHE_PATH/.claude-plugin"
cp -r plugins/flutter-dev-tools/skills/* "$CACHE_PATH/skills/"
cp plugins/flutter-dev-tools/.claude-plugin/plugin.json "$CACHE_PATH/.claude-plugin/"
cp README.md README_EN.md "$CACHE_PATH/"
echo "Synced to cache: $CACHE_PATH"
# === Sync to MARKETPLACE directory (git pull, NOT cp!) ===
# CRITICAL: Claude Code requires marketplace to be a git clone.
# If the directory doesn't exist or has no .git, clone it first.
if [ ! -d "$MARKETPLACE_PATH/.git" ]; then
echo "Marketplace not a git repo, cloning..."
rm -rf "$MARKETPLACE_PATH"
git clone [email protected]:adzcsx2/flutter-claude-skill.git "$MARKETPLACE_PATH"
else
echo "Marketplace is git repo, pulling latest..."
git -C "$MARKETPLACE_PATH" pull
fi
# Verify
echo "=== Cache skills ==="
ls -1 "$CACHE_PATH/skills/"
echo "=== Marketplace skills ==="
ls -1 "$MARKETPLACE_PATH/plugins/flutter-dev-tools/skills/"
CRITICAL: Without these registrations, Claude Code will NOT load the plugin.
Ensure ~/.claude/plugins/known_marketplaces.json has an entry:
{
"flutter-dev-tools": {
"source": {
"source": "git",
"url": "[email protected]:adzcsx2/flutter-claude-skill.git"
},
"installLocation": "/Users/hoyn/.claude/plugins/marketplaces/flutter-dev-tools",
"lastUpdated": "2026-04-14T00:00:00.000Z"
}
}
Ensure ~/.claude/settings.json has the plugin enabled:
{
"enabledPlugins": {
"flutter-dev-tools@flutter-dev-tools": true
}
}
Verify ~/.claude/plugins/installed_plugins.json points to correct version:
cat ~/.claude/plugins/installed_plugins.json | grep -A5 "flutter-dev-tools"
If version mismatch, update the file to point to the new version.
When syncing README.md and README_EN.md:
Symptoms:
! [rejected] main -> main (fetch first)
error: failed to push some refs
Solution:
git stash # Save any uncommitted changes
git pull --rebase
# Resolve conflicts if any
git rebase --continue
git push
git stash pop # Restore saved changes
Symptoms:
CONFLICT (content): Merge conflict in <file>
Solution:
<<<<<<<, =======, >>>>>>>)git add <file>git rebase --continueSymptoms:
Connection closed by <ip> port 22
fatal: Could not read from remote repository
Solution: Simply retry the push:
git push
Cause: Local plugins directory not synced after push
Solution: Run Step 8 (Sync Local Plugins) manually - sync BOTH cache AND marketplace directories.
Symptoms:
CONFLICT (content): Merge conflict in <file>
Auto-merging <file>
Solution: If stash conflicts are not critical, drop the stash:
git checkout --theirs <conflicted-file>
git stash drop
skills FieldSymptoms:
/plugin-name:skill-name command not recognizedRoot Cause: plugin.json missing "skills": ["./skills/"] field
Solution:
Add skills field to plugin.json:
{
"name": "flutter-dev-tools",
"version": "1.1.0",
"skills": ["./skills/"]
}
Then re-sync to local directories (Step 8).
Symptoms:
Root Cause: Claude Code requires the marketplace directory to be a valid git clone (with .git/). Manual cp copies won't work.
Solution: Replace manual copy with git clone:
rm -rf ~/.claude/plugins/marketplaces/flutter-dev-tools
git clone [email protected]:adzcsx2/flutter-claude-skill.git ~/.claude/plugins/marketplaces/flutter-dev-tools
For subsequent updates, use git pull:
git -C ~/.claude/plugins/marketplaces/flutter-dev-tools pull
Symptoms:
installed_plugins.json points to different version than expectedSolution:
Update ~/.claude/plugins/installed_plugins.json:
{
"plugins": {
"flutter-dev-tools@flutter-dev-tools": [
{
"installPath": "/Users/xxx/.claude/plugins/cache/flutter-dev-tools/flutter-dev-tools/1.1.0",
"version": "1.1.0"
}
]
}
}
Symptoms:
.orphaned_at file exists in plugin directorySolution: Remove the orphaned marker:
rm -f ~/.claude/plugins/cache/flutter-dev-tools/flutter-dev-tools/1.1.0/.orphaned_at
Symptoms:
plugin.json has skills fieldRoot Cause: Claude Code requires plugin registration in 3 config files. If any is missing, the plugin won't load.
Solution: Verify and fix all 3 registration points:
# 1. Check enabledPlugins in settings.json
grep "flutter-dev-tools" ~/.claude/settings.json
# 2. Check known_marketplaces.json
grep "flutter-dev-tools" ~/.claude/plugins/known_marketplaces.json
# 3. Check installed_plugins.json
grep "flutter-dev-tools" ~/.claude/plugins/installed_plugins.json
If any is missing, add it. See Step 9 for detailed format.
~/.claude/plugins/cache/flutter-dev-tools/flutter-dev-tools/{version}/~/.claude/plugins/marketplaces/flutter-dev-tools/ (必须是 git clone,不能用 cp 复制)~/.claude/plugins/installed_plugins.jsonsettings.json (enabledPlugins)、known_marketplaces.json、installed_plugins.jsonProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub adzcsx2/flutter-claude-skill --plugin flutter-dev-tools