ccoalm/ccl-skills / skills/skill-extraction-workflow
skill-extraction-workflow
Flagged复盘 / 沉淀 / 总结经验 / 补进技能 / 技能缺陷 / 流程优化 / would other teammates hit this / will we forget next time / teamwide recurrence / extract skill / post-mortem / 深度 review·审计技能仓库 / 对标外部技能包找 gap(benchmark superpowers·gstack 等) / 核查全局安装点(~/.config/opencode 等)旧快照是否遮蔽本仓技能 / 本仓(ccl-skills 等共享技能仓)OpenCode 项目配置·命令治理 → turn reusable lessons into durable CCL skills.
scripts/test_validate_skill_root_depth.sh
View on GitHub#!/usr/bin/env bash
# Regression: validate-skill.sh must discover skills laid out as
# <root>/skills/<name>/SKILL.md (depth 3) when invoked on the repo root.
#
# The discovery find used -maxdepth 2, matching <root>/<name>/SKILL.md only, so
# the documented default invocation `validate-skill.sh .` from a ccl-skills
# checkout exited 2 with no_skill_roots_found. The failure was loud (non-zero),
# but the default-vs-layout mismatch made "run the validator on the repo" fail
# spuriously. This test pins depth-3 discovery AND that a directory with no
# SKILL.md anywhere still fails loudly.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
VALIDATE="$SCRIPT_DIR/validate-skill.sh"
[ -f "$VALIDATE" ] || { echo "FAIL: validate script not found: $VALIDATE" >&2; exit 1; }
fail() { echo "FAIL: $*" >&2; exit 1; }
tmp="$(mktemp -d "${TMPDIR:-/tmp}/vsrd.XXXXXX")"
trap 'rm -rf "$tmp"' EXIT
# (1) repo-root layout: skills/<name>/SKILL.md is found at depth 3.
mkdir -p "$tmp/repo/skills/sample-skill"
cat > "$tmp/repo/skills/sample-skill/SKILL.md" <<'EOF'
---
name: sample-skill
description: Use when validating sample fixtures end to end.
---
# Sample skill
Body text.
EOF
# Excluded fixtures are deliberately INVALID (broken frontmatter): if a buggy
# discovery picks one up — even instead of the real root — validation fails
# loudly rather than false-greening on "1 root".
mkdir -p "$tmp/repo/skills/sample-skill/fixtures"
printf 'not-frontmatter\n' > "$tmp/repo/skills/sample-skill/fixtures/SKILL.md"
mkdir -p "$tmp/repo/vendor/thing"
printf 'not-frontmatter\n' > "$tmp/repo/vendor/thing/SKILL.md"
out="$(bash "$VALIDATE" "$tmp/repo" 2>&1)" || fail "repo-root run exited non-zero: $out"
# Pure-bash substring match, not `printf | grep -q`: grep -q exits on its first
# hit, the producer takes SIGPIPE, and under `set -o pipefail` the SUCCESS path
# then reports failure. Timing-dependent, so it stayed latent until this lane
# ran concurrently (specs/037-ci-intra-job-parallel/plan.md).
[[ "$out" == *"validating 1 skill root(s)"* ]] \
|| fail "expected exactly 1 root (nested fixture must be excluded): $out"
# (2) a tree with no SKILL.md still fails loudly (exit 2, no silent green).
mkdir -p "$tmp/empty/sub/deeper"
if out="$(bash "$VALIDATE" "$tmp/empty" 2>&1)"; then
fail "empty tree unexpectedly passed: $out"
fi
[[ "$out" == *no_skill_roots_found* ]] \
|| fail "empty tree missing loud no_skill_roots_found: $out"
echo "PASS: validate-skill discovers skills/<name>/SKILL.md and stays loud on empty trees"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |