[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F14BCG9C03DHG77406HCGN":3,"skill-same:01M7F14BCG9C03DHG77406HCGN":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7F14BCG9C03DHG77406HCGN","transcode-jpeg-to-jxl-lossless",null,"Use when the user wants to archive a JPEG-only library as JPEG XL — losslessly transcodes JPEG to .jxl, preserving the original bitstream for byte-exact recovery, with a dry-run preview and a byte-savings report (~15–25% reduction). Prefer this over the general-purpose `to-jxl` skill whenever the sources are exclusively JPEG and archival is the goal. Triggers - \"archive my JPEGs as JXL\", \"shrink this photo library losslessly\", \"JPEG to JXL without quality loss\".","shotcowboystyle\u002Fag-skills","shotcowboystyle","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F62471?v=4","01M7EZTCFCZJ6K3MYW8BPM4X6R","Curtis Blanton","01M7EZTCG1S5M04J90A931X9BX",0,"MIT","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fimage-ops\u002Fskills\u002Ftranscode-jpeg-to-jxl-lossless\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: transcode-jpeg-to-jxl-lossless\ndescription: Use when the user wants to archive a JPEG-only library as JPEG XL — losslessly transcodes JPEG to .jxl, preserving the original bitstream for byte-exact recovery, with a dry-run preview and a byte-savings report (~15–25% reduction). Prefer this over the general-purpose `to-jxl` skill whenever the sources are exclusively JPEG and archival is the goal. Triggers - \"archive my JPEGs as JXL\", \"shrink this photo library losslessly\", \"JPEG to JXL without quality loss\".\nallowed-tools: Bash(cjxl *), Bash(djxl *), Bash(command *), Bash(find *), Bash(sh *), Bash(awk *), Bash(wc *), Bash(du *), Bash(tail *), Bash(tee *), Read, Write\n---\n\n# Losslessly Transcode JPEG to JPEG XL\n\nWalk a directory of JPEG files and convert them to JPEG XL (.jxl) format using lossless encoding. `cjxl` automatically detects JPEG bitstream and preserves it without re-compression. Reports byte savings; explains how to recover the original JPEG if needed.\n\n## When to use\n\n- Archiving JPEG photo libraries to save space (typically 15–25% reduction) without image degradation.\n- Preparing a photo collection for long-term storage where compatibility with JPEG is not required.\n- Building a smaller-footprint JXL archive that can still yield the original JPEG byte-exact via `djxl`.\n\nFor non-JPEG sources, or for lossy\u002Fweb-quality JXL encodes, use `to-jxl` — this skill deliberately handles only the JPEG-archival case.\n\n## Inputs to gather\n\n- **Source directory** — folder containing JPEG files (`.jpg` or `.jpeg`). Default: current directory.\n- **Recursive?** Ask whether to process subdirectories. Default: **no** (flat, current folder only).\n- **Output location** — optional. Default: same directory as originals (`.jxl` files sit alongside `.jpg`).\n- **Dry run first?** Recommend a preview pass showing the count and byte savings estimate, before committing to the conversion.\n\n## Procedure\n\n### 1. Check tooling\n\n```bash\ncommand -v cjxl >\u002Fdev\u002Fnull || {\n  echo \"cjxl not installed — see the image-ops-install-deps skill\" >&2\n  exit 1\n}\n```\n\n### 2. Preview\n\nShow the user what will happen. Capture the original total into a variable — step 4 needs it to compute savings, and re-measuring the directory afterwards would count the new `.jxl` files too.\n\nSet the depth limit once, from the answer to \"recursive?\" in the inputs:\n\n```bash\nmaxdepth=\"-maxdepth 1\"   # non-recursive\nmaxdepth=\"\"              # recursive — omit the flag entirely\n```\n\n```bash\n# Count JPEGs in scope\nfind \"$target\" $maxdepth -type f \\\n  \\( -iname '*.jpg' -o -iname '*.jpeg' \\) | tee \u002Ftmp\u002Fjpegs.txt | wc -l\n\n# Original total, in bytes (not human-readable — it has to be arithmetic later)\nORIG_BYTES=$(find \"$target\" $maxdepth -type f \\\n  \\( -iname '*.jpg' -o -iname '*.jpeg' \\) -exec wc -c {} + \\\n  | awk '$NF == \"total\" { next } { s += $1 } END { print s+0 }')\n```\n\nSkipping the `total` lines matters: `-exec ... +` batches its arguments, so a large tree produces one `total` line per batch and naively summing every line would double-count.\n\n`wc -c` totals exact bytes; `du` rounds to block size and would skew the savings figure on a library of small files.\n\nPrint:\n- Number of JPEG files found.\n- Total original size.\n- Estimated output size (advise 20% reduction as a rough baseline).\n- Confirm before proceeding.\n\n### 3. Transcode\n\nUse `-d 0` (lossless) and a reasonable effort (suggest 6–7 for balance):\n\n`find` substitutes only the literal token `{}`. There is no `{.}` extension-stripping placeholder — that is GNU parallel syntax, and `find` would pass the literal string `{.}.jxl`, funnelling every file in the tree into one output that each conversion overwrites. Build the output name inside a shell instead, reusing the `$maxdepth` set in step 2:\n\n```bash\n: > \"$failed_log\"\n\nfind \"$target\" $maxdepth -type f \\\n  \\( -iname '*.jpg' -o -iname '*.jpeg' \\) \\\n  -exec sh -c '\n    for f do\n      cjxl -d 0 -e 7 \"$f\" \"${f%.*}.jxl\" || echo \"$f\" >> \"$0\"\n    done\n  ' \"$failed_log\" {} +\n```\n\n(The `-d 0` flag ensures lossless encoding. Effort 7 balances speed and compression. Effort 9 is slower but slightly smaller; only recommend if the user has time.)\n\n`$failed_log` collects every non-zero `cjxl` exit. `find -exec` does not propagate per-file status, so without this file a failed transcode is silently invisible in the step 4 report.\n\n### 4. Verify and report\n\nAfter transcoding:\n\n```bash\n# Count JXL files created\nfind \"$target\" $maxdepth -type f -iname '*.jxl' | wc -l\n\n# Total size of the new JXL files, in bytes\nJXL_BYTES=$(find \"$target\" $maxdepth -type f -iname '*.jxl' -exec wc -c {} + \\\n  | awk '$NF == \"total\" { next } { s += $1 } END { print s+0 }')\n\n# Bytes saved — an explicit subtraction against the step 2 figure\nawk -v o=\"$ORIG_BYTES\" -v n=\"$JXL_BYTES\" 'BEGIN {\n  printf \"original: %.1f MB\\njxl:      %.1f MB\\nsaved:    %.1f MB (%.1f%%)\\n\",\n         o\u002F1048576, n\u002F1048576, (o-n)\u002F1048576, (o ? (o-n)*100\u002Fo : 0)\n}'\n```\n\nDo **not** substitute `du -ch \"$target\"` for this. At this point the directory holds both the originals and the new `.jxl` files, so it measures the sum of the two, not the saving. The saving only exists as the difference between the step 2 figure and the step 4 figure.\n\nPrint:\n- Files successfully transcoded.\n- Original total size vs. new total size.\n- Bytes saved and percentage reduction (from the `awk` above).\n- Any failures — print the contents of `$failed_log`, and say \"none\" only when that file is empty.\n\n### 5. Explain recovery path\n\nInform the user:\n\n> If you ever need to recover the original JPEG bitstream byte-exact (for legal\u002Farchival purposes), run:\n> ```bash\n> djxl archive.jxl recovered.jpg\n> ```\n> This works because `cjxl` detected and preserved the original JPEG structure. Reconstruction is triggered by the `.jpg` output extension — there is no `--jpeg` flag in current libjxl. If the `.jxl` carries no reconstruction data, `djxl` reports an error rather than quietly writing a re-encoded approximation, so a successful run is itself the proof of byte-exactness.\n\n## Output \u002F side effects\n\n- `.jxl` files created in the source directory (or user-specified output folder).\n- Original `.jpg` files remain untouched.\n- No backup is created; if the originals must be preserved, the user should copy them first.\n\n## Notes\n\n- **Lossless JPEG preservation:** `cjxl` auto-detects JPEG bitstreams and preserves them exactly. This is why `djxl` can recover the original — it's not a re-encoded approximation.\n- **Effort 7 vs. 9:** Effort 7 compresses in seconds per image; effort 9 can take minutes. For batch workflows, 7 is recommended. Use 9 only if compression size is the overriding concern.\n- **Size savings:** Typical JPEG → JXL lossless reduction is 15–25%, depending on the original JPEG quality. Do not oversell — some JPEGs may compress only 5–10%.\n- **Selective transcoding:** If you want to skip already-small files or transcode only above a size threshold, filter the find output (e.g., `-size +100k` for files larger than 100 KB).\n- Do not delete the original JPEG files automatically. Let the user confirm removal after verifying the JXL output.\n- Depends on `libjxl-tools` (`apt install libjxl-tools` on Debian\u002FUbuntu, `brew install jpeg-xl` on macOS). Use `image-ops-install-deps` rather than installing by hand.\n","# Losslessly Transcode JPEG to JPEG XL\n\nWalk a directory of JPEG files and convert them to JPEG XL (.jxl) format using lossless encoding. `cjxl` automatically detects JPEG bitstream and preserves it without re-compression. Reports byte savings; explains how to recover the original JPEG if needed.\n\n## When to use\n\n- Archiving JPEG photo libraries to save space (typically 15–25% reduction) without image degradation.\n- Preparing a photo collection for long-term storage where compatibility with JPEG is not required.\n- Building a smaller-footprint JXL archive that can still yield the original JPEG byte-exact via `djxl`.\n\nFor non-JPEG sources, or for lossy\u002Fweb-quality JXL encodes, use `to-jxl` — this skill deliberately handles only the JPEG-archival case.\n\n## Inputs to gather\n\n- **Source directory** — folder containing JPEG files (`.jpg` or `.jpeg`). Default: current directory.\n- **Recursive?** Ask whether to process subdirectories. Default: **no** (flat, current folder only).\n- **Output location** — optional. Default: same directory as originals (`.jxl` files sit alongside `.jpg`).\n- **Dry run first?** Recommend a preview pass showing the count and byte savings estimate, before committing to the conversion.\n\n## Procedure\n\n### 1. Check tooling\n\n```bash\ncommand -v cjxl >\u002Fdev\u002Fnull || {\n  echo \"cjxl not installed — see the image-ops-install-deps skill\" >&2\n  exit 1\n}\n```\n\n### 2. Preview\n\nShow the user what will happen. Capture the original total into a variable — step 4 needs it to compute savings, and re-measuring the directory afterwards would count the new `.jxl` files too.\n\nSet the depth limit once, from the answer to \"recursive?\" in the inputs:\n\n```bash\nmaxdepth=\"-maxdepth 1\"   # non-recursive\nmaxdepth=\"\"              # recursive — omit the flag entirely\n```\n\n```bash\n# Count JPEGs in scope\nfind \"$target\" $maxdepth -type f \\\n  \\( -iname '*.jpg' -o -iname '*.jpeg' \\) | tee \u002Ftmp\u002Fjpegs.txt | wc -l\n\n# Original total, in bytes (not human-readable — it has to be arithmetic later)\nORIG_BYTES=$(find \"$target\" $maxdepth -type f \\\n  \\( -iname '*.jpg' -o -iname '*.jpeg' \\) -exec wc -c {} + \\\n  | awk '$NF == \"total\" { next } { s += $1 } END { print s+0 }')\n```\n\nSkipping the `total` lines matters: `-exec ... +` batches its arguments, so a large tree produces one `total` line per batch and naively summing every line would double-count.\n\n`wc -c` totals exact bytes; `du` rounds to block size and would skew the savings figure on a library of small files.\n\nPrint:\n- Number of JPEG files found.\n- Total original size.\n- Estimated output size (advise 20% reduction as a rough baseline).\n- Confirm before proceeding.\n\n### 3. Transcode\n\nUse `-d 0` (lossless) and a reasonable effort (suggest 6–7 for balance):\n\n`find` substitutes only the literal token `{}`. There is no `{.}` extension-stripping placeholder — that is GNU parallel syntax, and `find` would pass the literal string `{.}.jxl`, funnelling every file in the tree into one output that each conversion overwrites. Build the output name inside a shell instead, reusing the `$maxdepth` set in step 2:\n\n```bash\n: > \"$failed_log\"\n\nfind \"$target\" $maxdepth -type f \\\n  \\( -iname '*.jpg' -o -iname '*.jpeg' \\) \\\n  -exec sh -c '\n    for f do\n      cjxl -d 0 -e 7 \"$f\" \"${f%.*}.jxl\" || echo \"$f\" >> \"$0\"\n    done\n  ' \"$failed_log\" {} +\n```\n\n(The `-d 0` flag ensures lossless encoding. Effort 7 balances speed and compression. Effort 9 is slower but slightly smaller; only recommend if the user has time.)\n\n`$failed_log` collects every non-zero `cjxl` exit. `find -exec` does not propagate per-file status, so without this file a failed transcode is silently invisible in the step 4 report.\n\n### 4. Verify and report\n\nAfter transcoding:\n\n```bash\n# Count JXL files created\nfind \"$target\" $maxdepth -type f -iname '*.jxl' | wc -l\n\n# Total size of the new JXL files, in bytes\nJXL_BYTES=$(find \"$target\" $maxdepth -type f -iname '*.jxl' -exec wc -c {} + \\\n  | awk '$NF == \"total\" { next } { s += $1 } END { print s+0 }')\n\n# Bytes saved — an explicit subtraction against the step 2 figure\nawk -v o=\"$ORIG_BYTES\" -v n=\"$JXL_BYTES\" 'BEGIN {\n  printf \"original: %.1f MB\\njxl:      %.1f MB\\nsaved:    %.1f MB (%.1f%%)\\n\",\n         o\u002F1048576, n\u002F1048576, (o-n)\u002F1048576, (o ? (o-n)*100\u002Fo : 0)\n}'\n```\n\nDo **not** substitute `du -ch \"$target\"` for this. At this point the directory holds both the originals and the new `.jxl` files, so it measures the sum of the two, not the saving. The saving only exists as the difference between the step 2 figure and the step 4 figure.\n\nPrint:\n- Files successfully transcoded.\n- Original total size vs. new total size.\n- Bytes saved and percentage reduction (from the `awk` above).\n- Any failures — print the contents of `$failed_log`, and say \"none\" only when that file is empty.\n\n### 5. Explain recovery path\n\nInform the user:\n\n> If you ever need to recover the original JPEG bitstream byte-exact (for legal\u002Farchival purposes), run:\n> ```bash\n> djxl archive.jxl recovered.jpg\n> ```\n> This works because `cjxl` detected and preserved the original JPEG structure. Reconstruction is triggered by the `.jpg` output extension — there is no `--jpeg` flag in current libjxl. If the `.jxl` carries no reconstruction data, `djxl` reports an error rather than quietly writing a re-encoded approximation, so a successful run is itself the proof of byte-exactness.\n\n## Output \u002F side effects\n\n- `.jxl` files created in the source directory (or user-specified output folder).\n- Original `.jpg` files remain untouched.\n- No backup is created; if the originals must be preserved, the user should copy them first.\n\n## Notes\n\n- **Lossless JPEG preservation:** `cjxl` auto-detects JPEG bitstreams and preserves them exactly. This is why `djxl` can recover the original — it's not a re-encoded approximation.\n- **Effort 7 vs. 9:** Effort 7 compresses in seconds per image; effort 9 can take minutes. For batch workflows, 7 is recommended. Use 9 only if compression size is the overriding concern.\n- **Size savings:** Typical JPEG → JXL lossless reduction is 15–25%, depending on the original JPEG quality. Do not oversell — some JPEGs may compress only 5–10%.\n- **Selective transcoding:** If you want to skip already-small files or transcode only above a size threshold, filter the find output (e.g., `-size +100k` for files larger than 100 KB).\n- Do not delete the original JPEG files automatically. Let the user confirm removal after verifying the JXL output.\n- Depends on `libjxl-tools` (`apt install libjxl-tools` on Debian\u002FUbuntu, `brew install jpeg-xl` on macOS). Use `image-ops-install-deps` rather than installing by hand.\n",{"name":5,"description":7,"allowed-tools":24},"Bash(cjxl *), Bash(djxl *), Bash(command *), Bash(find *), Bash(sh *), Bash(awk *), Bash(wc *), Bash(du *), Bash(tail *), Bash(tee *), Read, Write","main","f846d9a97082ff30d613b55a085cef425d822473","plugins\u002Fimage-ops\u002Fskills\u002Ftranscode-jpeg-to-jxl-lossless","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle","https:\u002F\u002Fshotcowboystyle.github.io","Building smarter with AI, automation & modern tools. Exploring how far one person can go without a big team using today’s AI.","2026-11-10 04:58:27",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add shotcowboystyle\u002Fag-skills --skill transcode-jpeg-to-jxl-lossless",{"tool":39,"command":40},"bunx","bunx skills add shotcowboystyle\u002Fag-skills --skill transcode-jpeg-to-jxl-lossless",{"tool":42,"command":43},"pnpm","pnpm dlx skills add shotcowboystyle\u002Fag-skills --skill transcode-jpeg-to-jxl-lossless","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fimage-ops\u002Fskills\u002Ftranscode-jpeg-to-jxl-lossless\u002FSKILL.md",true,[],[48,54,61,68,75,82],{"skillNo":49,"name":50,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M7F1YRY5S5QRJ1V0BJS130QX","no-description","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fno-description\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7F1Y9BV2FJNQJ3NB32JS5CM","good-skill","Fixture skill that satisfies every rule.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgood-skill\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7F1XXBQ3NQRXZSS0KAGAR9V","broken-link","Links to a reference file that does not exist.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fbroken-link\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7F1XBX4R46NR9W0HXQ7XCDX","Bad_Name","Name violates the kebab-case rule and does not match the directory.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fbad-name\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7F1WNAF8WNEQ7S5HKT5VK0D","skill-authoring","Write, review, and validate portable agent skills in SKILL.md format. Use when creating a new skill, editing an existing one, or asked whether a skill follows the Agent Skills spec.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fskills\u002Fskill-authoring\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7F1W30TC0XFNSF7YBRGETK2","weigh-bags","Record scale readings for each bag — empty (tare), outbound, current, final — and reconcile them against the itemised inventory to find unaccounted weight. Use when the user gives a bag weight, says how heavy something is, weighs their luggage, or asks how close to the limit they are. Appends to bags.yaml and runs scripts\u002Freconcile.py.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Ftravel-packing-assistant\u002Fskills\u002Fweigh-bags\u002FSKILL.md",[],[]]