[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XC5WY2K7PA1H397K58NQGD":3,"skill-same:01M6XC5WY2K7PA1H397K58NQGD":66},{"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":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":13,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":45,"install":46,"resources":59},"01M6XC5WY2K7PA1H397K58NQGD","combined-head-linecount-check",null,"Verify a file's first N lines and total line count in one shell call using head and wc -l with an echo separator, minimizing read operations and shell iterations.","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\u002Fcombined-head-linecount-check\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"combined","combined head linecount check","check","head","call","count","wc","line count","with","line","file","Echo","operations","read","shell","verify","first","2026-11-10 10:12:30",false,"---\nname: combined-head-linecount-check\ndescription: Verify a file's first N lines and total line count in one shell call using head and wc -l with an echo separator, minimizing read operations and shell iterations.\n---\n\n# Combined Head + Line Count Check\n\nWhen you need to **both** inspect the top of a file and confirm its total line count, collapse the two checks into a single `run_shell` call instead of issuing two separate commands.\n\n## Why\n\n- Each shell call is a round-trip. Two separate calls (`head` then `wc -l`) cost two iterations.\n- A combined call costs one iteration and returns both pieces of information atomically.\n- When checking multiple files at once, each file still only needs one call (or all files can be parallelized in a single compound command).\n\n## Pattern\n\n```bash\nhead -N \u003Cfile> && echo \"---\" && wc -l \u003Cfile>\n```\n\nThe `echo \"---\"` separator makes the output easy to parse visually: everything above the dashes is content, everything below is the line count.\n\n## Examples\n\n### Single file — inspect first 10 lines and total count\n\n```bash\nhead -10 src\u002Fmain.ts && echo \"---\" && wc -l src\u002Fmain.ts\n```\n\nSample output:\n```\nimport { createApp } from 'vue'\nimport App from '.\u002FApp.vue'\n...\n---\n      142 src\u002Fmain.ts\n```\n\n### Multiple files — fully parallelized\n\nWhen you need to check several files simultaneously, run them all in one shell call using `&&` chains or newline-separated subshells:\n\n```bash\n(head -10 src\u002Fmain.ts     && echo \"---\" && wc -l src\u002Fmain.ts)     && echo \"===\" && \\\n(head -10 vite.config.ts  && echo \"---\" && wc -l vite.config.ts)  && echo \"===\" && \\\n(head -5  package.json    && echo \"---\" && wc -l package.json)\n```\n\nOr, if order independence is acceptable, run them in parallel background jobs and wait:\n\n```bash\n{\n  head -10 src\u002Fmain.ts    && echo \"---\" && wc -l src\u002Fmain.ts\n} &\n{\n  head -10 vite.config.ts && echo \"---\" && wc -l vite.config.ts\n} &\nwait\n```\n\n## When to Apply\n\n| Situation | Recommendation |\n|-----------|---------------|\n| Verifying a generated\u002Fmodified file was written correctly | ✅ Use combined call |\n| Checking multiple output files after a build step | ✅ Parallelize all in one shell call |\n| Only need line count (no content preview required) | Use plain `wc -l` |\n| Only need content (no line count required) | Use plain `head -N` |\n| File is extremely large and you want a middle section | Use `sed -n` or `awk` instead |\n\n## Integration with Parallel Reads\n\nThis pattern compounds well with parallel file reads. In a single iteration you can:\n\n1. Read file contents with `cat` or `head` for multiple files.\n2. Simultaneously verify line counts with `wc -l`.\n3. Check for specific patterns with `grep -c`.\n\nExample of a 5-file parallel verification in one shell call:\n\n```bash\necho \"=== main.ts ===\" && head -10 src\u002Fmain.ts && echo \"lines:\" && wc -l \u003C src\u002Fmain.ts && \\\necho \"=== config ===\" && head -5 vite.config.ts && echo \"lines:\" && wc -l \u003C vite.config.ts && \\\necho \"=== package ===\" && head -5 package.json && echo \"lines:\" && wc -l \u003C package.json && \\\necho \"=== index ===\" && head -8 index.html && echo \"lines:\" && wc -l \u003C index.html && \\\necho \"=== readme ===\" && head -5 README.md && echo \"lines:\" && wc -l \u003C README.md\n```\n\n> **Tip:** Using `wc -l \u003C file` (with input redirect) prints only the number, without the filename — cleaner output when the filename is already shown by the `echo` label above it.\n\n## Key Takeaway\n\n> **Never use two shell calls where one will do.** Combining `head -N` and `wc -l` in a single command is the minimal-overhead way to answer both \"what does this file contain?\" and \"is it the right size?\" simultaneously.","# Combined Head + Line Count Check\n\nWhen you need to **both** inspect the top of a file and confirm its total line count, collapse the two checks into a single `run_shell` call instead of issuing two separate commands.\n\n## Why\n\n- Each shell call is a round-trip. Two separate calls (`head` then `wc -l`) cost two iterations.\n- A combined call costs one iteration and returns both pieces of information atomically.\n- When checking multiple files at once, each file still only needs one call (or all files can be parallelized in a single compound command).\n\n## Pattern\n\n```bash\nhead -N \u003Cfile> && echo \"---\" && wc -l \u003Cfile>\n```\n\nThe `echo \"---\"` separator makes the output easy to parse visually: everything above the dashes is content, everything below is the line count.\n\n## Examples\n\n### Single file — inspect first 10 lines and total count\n\n```bash\nhead -10 src\u002Fmain.ts && echo \"---\" && wc -l src\u002Fmain.ts\n```\n\nSample output:\n```\nimport { createApp } from 'vue'\nimport App from '.\u002FApp.vue'\n...\n---\n      142 src\u002Fmain.ts\n```\n\n### Multiple files — fully parallelized\n\nWhen you need to check several files simultaneously, run them all in one shell call using `&&` chains or newline-separated subshells:\n\n```bash\n(head -10 src\u002Fmain.ts     && echo \"---\" && wc -l src\u002Fmain.ts)     && echo \"===\" && \\\n(head -10 vite.config.ts  && echo \"---\" && wc -l vite.config.ts)  && echo \"===\" && \\\n(head -5  package.json    && echo \"---\" && wc -l package.json)\n```\n\nOr, if order independence is acceptable, run them in parallel background jobs and wait:\n\n```bash\n{\n  head -10 src\u002Fmain.ts    && echo \"---\" && wc -l src\u002Fmain.ts\n} &\n{\n  head -10 vite.config.ts && echo \"---\" && wc -l vite.config.ts\n} &\nwait\n```\n\n## When to Apply\n\n| Situation | Recommendation |\n|-----------|---------------|\n| Verifying a generated\u002Fmodified file was written correctly | ✅ Use combined call |\n| Checking multiple output files after a build step | ✅ Parallelize all in one shell call |\n| Only need line count (no content preview required) | Use plain `wc -l` |\n| Only need content (no line count required) | Use plain `head -N` |\n| File is extremely large and you want a middle section | Use `sed -n` or `awk` instead |\n\n## Integration with Parallel Reads\n\nThis pattern compounds well with parallel file reads. In a single iteration you can:\n\n1. Read file contents with `cat` or `head` for multiple files.\n2. Simultaneously verify line counts with `wc -l`.\n3. Check for specific patterns with `grep -c`.\n\nExample of a 5-file parallel verification in one shell call:\n\n```bash\necho \"=== main.ts ===\" && head -10 src\u002Fmain.ts && echo \"lines:\" && wc -l \u003C src\u002Fmain.ts && \\\necho \"=== config ===\" && head -5 vite.config.ts && echo \"lines:\" && wc -l \u003C vite.config.ts && \\\necho \"=== package ===\" && head -5 package.json && echo \"lines:\" && wc -l \u003C package.json && \\\necho \"=== index ===\" && head -8 index.html && echo \"lines:\" && wc -l \u003C index.html && \\\necho \"=== readme ===\" && head -5 README.md && echo \"lines:\" && wc -l \u003C README.md\n```\n\n> **Tip:** Using `wc -l \u003C file` (with input redirect) prints only the number, without the filename — cleaner output when the filename is already shown by the `echo` label above it.\n\n## Key Takeaway\n\n> **Never use two shell calls where one will do.** Combining `head -N` and `wc -l` in a single command is the minimal-overhead way to answer both \"what does this file contain?\" and \"is it the right size?\" simultaneously.",{"name":5,"description":7},"main","0650921d63895de3997bc81f1ff1d0ac67032072","showcase\u002Fskills\u002Fcombined-head-linecount-check","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":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill combined-head-linecount-check",{"tool":52,"command":53},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill combined-head-linecount-check",{"tool":55,"command":56},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill combined-head-linecount-check","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fcombined-head-linecount-check\u002FSKILL.md",true,[60],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},".skill_id","OTHER","其他",43,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fcombined-head-linecount-check\u002F.skill_id",[67,90,105,113,143,159],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":35},"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",[],[20,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,28,89],"write","write special chars ts check","typescript","filters","characters","Existing","type-checking","for","errors","script","output","type","files","only","template","python",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":35},"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",[],[97,98,74,28,99,89,100,101,102,103,31,88,104,26,78,81,83],"readback","write special chars readback","helper","post","via","scripts","cleanup","verification",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":35},"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",[],[112,74,78,32,83,101,88,28,89,81],"write special chars heredoc",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":124,"publishedAt":35},"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],{"categoryNo":120,"categoryName":121,"taxonomyType":122,"taxonomyTypeDesc":123},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[125,126,127,128,129,76,130,131,132,133,134,81,135,136,137,138,139,140,141,142],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api","data",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":35},"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",[],[150,151,152,153,81,154,26,155,156,157,158],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":35},"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",[],[166,167,168,33,169,34,28,170,171,172],"directory","verify directory structure","structure","access","issues","diagnose","file access"]