[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XC8CG18HBF2DVQ6585SHMY":3,"skill-same:01M6XC8CG18HBF2DVQ6585SHMY":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":13,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":41,"install":42,"resources":55},"01M6XC8CG18HBF2DVQ6585SHMY","list-and-count-directories",null,"List and count directories in a path by filtering list_dir results for directory entries and excluding hidden\u002Fsystem files","UF-gzj\u002Fopenspace-claude-evolution","UF-gzj","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F272393507?v=4","01M6XBCZB755P01VVYGQWPYZY3","01M6XBCZFJA5AREA17WGETA3FW",0,"MIT","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Flist-and-count-directories\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30],"list","directories","list and count directories","count","directory","system","results","filtering","files","entries","path","for","hidden","2026-11-10 10:12:30",false,"---\nname: list-and-count-directories\ndescription: List and count directories in a path by filtering list_dir results for directory entries and excluding hidden\u002Fsystem files\n---\n\n# List and Count Directories\n\nThis skill provides a systematic workflow for listing and counting directories within a given path using the `list_dir` tool. It filters results to identify directories, excludes hidden and system entries, and presents both an enumerated list and a total count.\n\n## Use Cases\n\n- Project structure analysis\n- Skill or module inventory\n- Repository exploration\n- Directory auditing and documentation\n\n## Workflow\n\n### Step 1: Get Directory Contents\n\nUse `list_dir` to retrieve the contents of the target path:\n\n```\nlist_dir(path=\"\u002Fpath\u002Fto\u002Ftarget\")\n```\n\n### Step 2: Identify Directories\n\nFilter the results to identify directory entries. Directories are marked by permissions starting with `d` in Unix ls format (e.g., `drwxr-xr-x`).\n\n**Recognition pattern:**\n- Look for entries where the permissions field starts with `d`\n- Common directory permission patterns: `drwxr-xr-x`, `drwxrwxr-x`, `drwx------`, etc.\n\n### Step 3: Exclude Hidden and System Entries\n\nFilter out entries that should not be counted:\n- `.` (current directory)\n- `..` (parent directory)\n- `.DS_Store` (macOS metadata)\n- Other hidden files starting with `.` (optional, depending on requirements)\n\n### Step 4: Create Enumerated List\n\nPresent the directories as a numbered list for easy reference:\n\n```\n1. directory-name-1\n2. directory-name-2\n3. directory-name-3\n...\n```\n\n### Step 5: Provide Total Count\n\nCalculate and report the total number of directories found:\n\n```\nTotal: N directories\n```\n\n## Implementation Example\n\nWhen implementing this workflow programmatically, use the following approach:\n\n```python\n# Pseudo-code for filtering directories\ndirectories = []\nfor entry in dir_listing:\n    # Check if entry is a directory (starts with 'd')\n    if entry['permissions'].startswith('d'):\n        name = entry['name']\n        # Exclude hidden\u002Fsystem entries\n        if name not in ['.', '..', '.DS_Store']:\n            directories.append(name)\n\n# Sort for consistent ordering\ndirectories.sort()\n\n# Present enumerated list\nfor i, dirname in enumerate(directories, 1):\n    print(f\"{i}. {dirname}\")\n\n# Provide total count\nprint(f\"\\nTotal: {len(directories)} directories\")\n```\n\n## Tips\n\n- **Sorting**: Always sort directory names alphabetically for consistent, predictable output\n- **Context**: Mention the path being analyzed for clarity\n- **Validation**: If the count is zero, verify the path exists and contains directories\n- **Extensions**: This pattern can be adapted to filter for files, specific extensions, or other criteria\n\n## Common Patterns\n\n### Basic directory listing with count:\n```\nDirectories in \u002Fskills:\n1. authentication-helpers\n2. data-processing\n3. workflow-automation\n\nTotal: 3 directories\n```\n\n### With additional context:\n```\nFound 3 skill directories in \u002Fskills:\n1. authentication-helpers\n2. data-processing  \n3. workflow-automation\n```\n\n### Including path context:\n```\nDirectory inventory for \u002Fpath\u002Fto\u002Fmodules:\n- module-a\n- module-b\n- module-c\nCount: 3 directories\n```\n\n## Related Techniques\n\n- Use similar filtering logic to count files instead of directories (permissions starting with `-`)\n- Extend to filter by modification date, size, or naming patterns\n- Combine with recursive directory traversal for deep structure analysis","# List and Count Directories\n\nThis skill provides a systematic workflow for listing and counting directories within a given path using the `list_dir` tool. It filters results to identify directories, excludes hidden and system entries, and presents both an enumerated list and a total count.\n\n## Use Cases\n\n- Project structure analysis\n- Skill or module inventory\n- Repository exploration\n- Directory auditing and documentation\n\n## Workflow\n\n### Step 1: Get Directory Contents\n\nUse `list_dir` to retrieve the contents of the target path:\n\n```\nlist_dir(path=\"\u002Fpath\u002Fto\u002Ftarget\")\n```\n\n### Step 2: Identify Directories\n\nFilter the results to identify directory entries. Directories are marked by permissions starting with `d` in Unix ls format (e.g., `drwxr-xr-x`).\n\n**Recognition pattern:**\n- Look for entries where the permissions field starts with `d`\n- Common directory permission patterns: `drwxr-xr-x`, `drwxrwxr-x`, `drwx------`, etc.\n\n### Step 3: Exclude Hidden and System Entries\n\nFilter out entries that should not be counted:\n- `.` (current directory)\n- `..` (parent directory)\n- `.DS_Store` (macOS metadata)\n- Other hidden files starting with `.` (optional, depending on requirements)\n\n### Step 4: Create Enumerated List\n\nPresent the directories as a numbered list for easy reference:\n\n```\n1. directory-name-1\n2. directory-name-2\n3. directory-name-3\n...\n```\n\n### Step 5: Provide Total Count\n\nCalculate and report the total number of directories found:\n\n```\nTotal: N directories\n```\n\n## Implementation Example\n\nWhen implementing this workflow programmatically, use the following approach:\n\n```python\n# Pseudo-code for filtering directories\ndirectories = []\nfor entry in dir_listing:\n    # Check if entry is a directory (starts with 'd')\n    if entry['permissions'].startswith('d'):\n        name = entry['name']\n        # Exclude hidden\u002Fsystem entries\n        if name not in ['.', '..', '.DS_Store']:\n            directories.append(name)\n\n# Sort for consistent ordering\ndirectories.sort()\n\n# Present enumerated list\nfor i, dirname in enumerate(directories, 1):\n    print(f\"{i}. {dirname}\")\n\n# Provide total count\nprint(f\"\\nTotal: {len(directories)} directories\")\n```\n\n## Tips\n\n- **Sorting**: Always sort directory names alphabetically for consistent, predictable output\n- **Context**: Mention the path being analyzed for clarity\n- **Validation**: If the count is zero, verify the path exists and contains directories\n- **Extensions**: This pattern can be adapted to filter for files, specific extensions, or other criteria\n\n## Common Patterns\n\n### Basic directory listing with count:\n```\nDirectories in \u002Fskills:\n1. authentication-helpers\n2. data-processing\n3. workflow-automation\n\nTotal: 3 directories\n```\n\n### With additional context:\n```\nFound 3 skill directories in \u002Fskills:\n1. authentication-helpers\n2. data-processing  \n3. workflow-automation\n```\n\n### Including path context:\n```\nDirectory inventory for \u002Fpath\u002Fto\u002Fmodules:\n- module-a\n- module-b\n- module-c\nCount: 3 directories\n```\n\n## Related Techniques\n\n- Use similar filtering logic to count files instead of directories (permissions starting with `-`)\n- Extend to filter by modification date, size, or naming patterns\n- Combine with recursive directory traversal for deep structure analysis",{"name":5,"description":7},"main","0650921d63895de3997bc81f1ff1d0ac67032072","showcase\u002Fskills\u002Flist-and-count-directories","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution","https:\u002F\u002Fgithub.com\u002FUF-gzj","2026-04-16 09:31:03",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill list-and-count-directories",{"tool":48,"command":49},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill list-and-count-directories",{"tool":51,"command":52},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill list-and-count-directories","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Flist-and-count-directories\u002FSKILL.md",true,[56],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},".skill_id","OTHER","其他",40,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Flist-and-count-directories\u002F.skill_id",[63,86,103,112,137,152],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":31},"01M6XCCXD3NCM2YKR3WNGBASPC","write-special-chars-ts-check","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, plus a reliable TypeScript type-checking step that filters output to only the newly-written files to avoid being misled by pre-existing errors.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[70,71,72,73,74,75,76,77,29,78,79,80,81,26,82,83,84,85],"check","write","write special chars ts check","typescript","filters","characters","Existing","type-checking","errors","script","output","type","only","template","file","python",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":31},"01M6XCCT7E3J922Q345PBGSHPN","write-special-chars-readback","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, with mandatory post-write verification via read_file and cleanup of \u002Ftmp helper scripts.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[93,94,71,84,95,85,96,97,98,99,100,83,101,102,75,29,79],"readback","write special chars readback","helper","post","via","scripts","cleanup","read","verification","with",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":31},"01M6XCCMQX1R8B6FECWB3P63T7","write-special-chars-heredoc","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) by using a Python heredoc script executed via shell.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[110,71,75,111,79,97,83,84,85,29],"write special chars heredoc","shell",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":31},"01M6XCCG41M994JJEX6VN52PEP","worldmonitor-reference","Curated architecture index of the WorldMonitor open-source dashboard. Reference for extracting patterns — vanilla TypeScript, Panel class hierarchy, service layer, CSS grid, API edge functions, refresh scheduler, and 60+ data source integrations.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[],[119,120,121,122,123,73,124,125,126,127,128,29,129,130,131,132,133,134,135,136],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api","data",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":31},"01M6XCCCHWNKG2W4VH9E6A10HF","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[144,18,145,146,29,147,102,148,149,150,151],"virtual list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":31},"01M6XCC7X8PKMR2DEW91XGHYSV","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[22,159,160,161,162,163,84,164,165,166],"verify directory structure","structure","verify","access","first","issues","diagnose","file access"]