fix: add LICENSE, fix check-destructive.sh bugs, align read routing table

- Add MIT LICENSE file (2026 Tw93); README badge was linking to a 404
- Fix grep -F pattern bug: 'git checkout \.' never matched 'git checkout .'
- Fix --no-verify being parsed as a grep flag; use grep -qF -- to end options
- Add -m1 to version grep in CLAUDE.md to avoid matching body text
- Add mp.weixin.qq.com row to read/SKILL.md routing table to match README
This commit is contained in:
Tw93
2026-04-08 16:41:45 +08:00
parent e74a154318
commit e47795f925
4 changed files with 25 additions and 3 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ for f in skills/*/SKILL.md; do head -5 "$f" | grep -q "^name:" && echo "ok: $f"
# Version consistency: SKILL.md must match marketplace.json
for skill in check design health hunt learn read think write; do
skill_ver=$(grep "version:" "skills/$skill/SKILL.md" | tr -d '"' | awk '{print $2}')
skill_ver=$(grep -m1 "version:" "skills/$skill/SKILL.md" | tr -d '"' | awk '{print $2}')
market_ver=$(python3 -c "import json; d=json.load(open('.claude-plugin/marketplace.json')); print([p['version'] for p in d['plugins'] if p['name']=='$skill'][0])")
[ "$skill_ver" = "$market_ver" ] && echo "ok: $skill $skill_ver" || echo "MISMATCH: $skill SKILL=$skill_ver MARKET=$market_ver"
done
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Tw93
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+2 -2
View File
@@ -16,12 +16,12 @@ DESTRUCTIVE_PATTERNS=(
'TRUNCATE '
'--no-verify'
'git reset --hard'
'git checkout \.'
'git checkout .'
'git clean -f'
)
for pattern in "${DESTRUCTIVE_PATTERNS[@]}"; do
if echo "$INPUT" | grep -qF "$pattern"; then
if echo "$INPUT" | grep -qF -- "$pattern"; then
echo "BLOCK: Destructive command detected during /check review: $pattern" >&2
echo "Confirm with user before proceeding." >&2
exit 2
+1
View File
@@ -14,6 +14,7 @@ Convert any URL or local PDF to clean Markdown and save it.
| Input | Method |
|-------|--------|
| `feishu.cn`, `larksuite.com` | Feishu API script |
| `mp.weixin.qq.com` | WeChat article script (Playwright fallback) |
| `.pdf` URL or local PDF path | PDF extraction |
| Everything else | Run `scripts/fetch.sh {url}` (proxy cascade with auto-fallback) |