fix(audit-scan): count files recursively in subfolders
- Commands in subfolders (tech/, product/, support/) now counted correctly - Split count_files() into count_md_files() and count_script_files() - Hooks counted as scripts (.sh/.js/.py/.ts), others as .md - Excludes README.md from counts - Bug: Was reporting 0 commands when 10 existed in subfolders - Bump version to 2.9.6 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f01ff982d5
commit
98044a0a47
5 changed files with 35 additions and 12 deletions
13
CHANGELOG.md
13
CHANGELOG.md
|
|
@ -6,6 +6,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [2.9.6] - 2026-01-12
|
||||
|
||||
### Fixed
|
||||
- **audit-scan.sh** - Count files recursively in subfolders
|
||||
- Commands in subfolders (e.g., `commands/tech/`, `commands/product/`) now counted
|
||||
- Split into `count_md_files()` for .md and `count_script_files()` for hooks (.sh/.js/.py/.ts)
|
||||
- Excludes README.md from counts
|
||||
- Bug found: Was reporting 0 commands when 10 existed in subfolders
|
||||
|
||||
### Stats
|
||||
- 1 file modified (audit-scan.sh, ~15 lines)
|
||||
- Critical fix for accurate extension counting
|
||||
|
||||
## [2.9.5] - 2026-01-12
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ If this guide saved you time, helped you master Claude Code, or inspired your wo
|
|||
|
||||
---
|
||||
|
||||
*Version 2.9.5 | January 2026 | Crafted with Claude*
|
||||
*Version 2.9.6 | January 2026 | Crafted with Claude*
|
||||
|
||||
<!-- SEO Keywords -->
|
||||
<!-- claude code, claude code tutorial, anthropic cli, ai coding assistant, claude code mcp,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Source: english-ultimate-claude-code-guide.md
|
||||
# Purpose: Condensed index for LLMs to quickly answer user questions about Claude Code
|
||||
|
||||
version: "2.9.5"
|
||||
version: "2.9.6"
|
||||
updated: "2026-01"
|
||||
|
||||
# ════════════════════════════════════════════════════════════════
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
**Last updated**: January 2026
|
||||
|
||||
**Version**: 2.9.5
|
||||
**Version**: 2.9.6
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -9009,4 +9009,4 @@ Thumbs.db
|
|||
|
||||
**Contributions**: Issues and PRs welcome.
|
||||
|
||||
**Last updated**: January 2026 | **Version**: 2.9.5
|
||||
**Last updated**: January 2026 | **Version**: 2.9.6
|
||||
|
|
|
|||
|
|
@ -45,9 +45,19 @@ check_file() {
|
|||
[[ -f "$1" ]] && echo "true" || echo "false"
|
||||
}
|
||||
|
||||
count_files() {
|
||||
count_md_files() {
|
||||
if [[ -d "$1" ]]; then
|
||||
find "$1" -maxdepth 1 -type f 2>/dev/null | wc -l | tr -d ' '
|
||||
# Count all .md files recursively (commands/skills can have subfolders)
|
||||
find "$1" -type f -name "*.md" ! -name "README.md" 2>/dev/null | wc -l | tr -d ' '
|
||||
else
|
||||
echo "0"
|
||||
fi
|
||||
}
|
||||
|
||||
count_script_files() {
|
||||
if [[ -d "$1" ]]; then
|
||||
# Count hook scripts (.sh, .js, .py, .ts)
|
||||
find "$1" -type f \( -name "*.sh" -o -name "*.js" -o -name "*.py" -o -name "*.ts" \) 2>/dev/null | wc -l | tr -d ' '
|
||||
else
|
||||
echo "0"
|
||||
fi
|
||||
|
|
@ -93,12 +103,12 @@ LOCAL_CLAUDE_MD=$(check_file "./.claude/CLAUDE.md")
|
|||
PROJECT_SETTINGS=$(check_file "./.claude/settings.json")
|
||||
LOCAL_SETTINGS=$(check_file "./.claude/settings.local.json")
|
||||
|
||||
# Extensions
|
||||
AGENTS_COUNT=$(count_files "./.claude/agents")
|
||||
COMMANDS_COUNT=$(count_files "./.claude/commands")
|
||||
SKILLS_COUNT=$(count_files "./.claude/skills")
|
||||
HOOKS_COUNT=$(count_files "./.claude/hooks")
|
||||
RULES_COUNT=$(count_files "./.claude/rules")
|
||||
# Extensions (count .md files recursively, hooks are scripts)
|
||||
AGENTS_COUNT=$(count_md_files "./.claude/agents")
|
||||
COMMANDS_COUNT=$(count_md_files "./.claude/commands")
|
||||
SKILLS_COUNT=$(count_md_files "./.claude/skills")
|
||||
HOOKS_COUNT=$(count_script_files "./.claude/hooks")
|
||||
RULES_COUNT=$(count_md_files "./.claude/rules")
|
||||
|
||||
# Tech stack detection
|
||||
TECH_STACK="unknown"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue