[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M739B07YP5PKDM7M623QASGD":3,"skill-same:01M739B07YP5PKDM7M623QASGD":59},{"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":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M739B07YP5PKDM7M623QASGD","generate-puzzle",null,"Generate jigsaw puzzles via generate_puzzle() or geom_puzzle_*() with parameter validation against inst\u002Fconfig.yml. Supports rectangular, hexagonal, concentric, voronoi, and snic puzzle types with configurable grid, size, seed, offset, and layout parameters. Use when creating puzzle SVG files for a specific type and configuration, testing generation with different parameters, generating sample output for documentation or demos, or creating ggplot2 puzzle visualizations.","roohe\u002Fagentic-super-skills","roohe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99054084?v=4","01M734WCDFP6RZVT5CNM00QR26","01M734WCE4BD0T4NZS5PCV9V5F",10,"MIT","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fgenerate-puzzle\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: generate-puzzle\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-24\"\ndescription: >\n  Generate jigsaw puzzles via generate_puzzle() or geom_puzzle_*() with\n  parameter validation against inst\u002Fconfig.yml. Supports rectangular,\n  hexagonal, concentric, voronoi, and snic puzzle types with configurable\n  grid, size, seed, offset, and layout parameters. Use when creating puzzle\n  SVG files for a specific type and configuration, testing generation with\n  different parameters, generating sample output for documentation or demos,\n  or creating ggplot2 puzzle visualizations.\nlicense: MIT\nallowed-tools: Read Write Edit Bash Grep Glob\nmetadata:\n  author: Philipp Thoss\n  version: \"1.0\"\n  domain: jigsawr\n  complexity: basic\n  language: R\n  tags: jigsawr, puzzle, svg, generation, ggplot2\n---\n\n# Generate Puzzle\n\nGenerate jigsaw puzzles using the jigsawR package's unified API.\n\n## When to Use\n\n- Creating puzzle SVG files for a specific type and configuration\n- Testing puzzle generation with different parameters\n- Generating sample output for documentation or demos\n- Creating ggplot2 puzzle visualizations with geom_puzzle_*()\n\n## Inputs\n\n- **Required**: Puzzle type (`\"rectangular\"`, `\"hexagonal\"`, `\"concentric\"`, `\"voronoi\"`, `\"random\"`, `\"snic\"`)\n- **Required**: Grid dimensions (type-dependent: `c(cols, rows)` or `c(rings)`)\n- **Optional**: Size in mm (default varies by type)\n- **Optional**: Seed for reproducibility (default: 42)\n- **Optional**: Offset (0 = interlocked, >0 = separated pieces)\n- **Optional**: Layout (`\"grid\"` or `\"repel\"` for rectangular)\n- **Optional**: Fusion groups (PILES notation string)\n\n## Procedure\n\n### Step 1: Read Config Constraints\n\n```bash\nR_EXE=\"\u002Fmnt\u002Fc\u002FProgram Files\u002FR\u002FR-4.5.0\u002Fbin\u002FRscript.exe\"\n\"$R_EXE\" -e \"cat(yaml::yaml.load_file('inst\u002Fconfig.yml')[['{TYPE}']]$grid$max)\"\n```\n\nOr read `inst\u002Fconfig.yml` directly to check valid ranges for the chosen type.\n\n**Got:** The min\u002Fmax values for grid, size, tabsize, and other parameters are known for the chosen puzzle type.\n\n**If fail:** If `config.yml` is missing or the type key doesn't exist, check that you are in the jigsawR project root and the package has been built at least once.\n\n### Step 2: Determine Type and Parameters\n\nMap the user's request to valid `generate_puzzle()` arguments:\n\n| Type | grid | size | Extra params |\n|------|------|------|-------------|\n| rectangular | `c(cols, rows)` | `c(width, height)` mm | `offset`, `layout`, `tabsize` |\n| hexagonal | `c(rings)` | `c(diameter)` mm | `do_warp`, `do_trunc`, `tabsize` |\n| concentric | `c(rings)` | `c(diameter)` mm | `center_shape`, `tabsize` |\n| voronoi | `c(cols, rows)` | `c(width, height)` mm | `n_interior`, `tabsize` |\n| random | `c(cols, rows)` | `c(width, height)` mm | `n_interior`, `tabsize` |\n| snic | `c(cols, rows)` | `c(width, height)` mm | `n_interior`, `compactness`, `tabsize` |\n\n**Got:** User request mapped to valid `generate_puzzle()` arguments with correct `type`, `grid` dimensions, and `size` values within the ranges from config.yml.\n\n**If fail:** If unsure which parameter format to use, refer to the table above. Rectangular and voronoi types use `c(cols, rows)` for grid; hexagonal and concentric use `c(rings)`.\n\n### Step 3: Create R Script\n\nWrite a script file (preferred over `-e` for complex commands):\n\n```r\nlibrary(jigsawR)\n\nresult \u003C- generate_puzzle(\n  type = \"rectangular\",\n  seed = 42,\n  grid = c(3, 4),\n  size = c(400, 300),\n  offset = 0,\n  layout = \"grid\"\n)\n\ncat(\"Pieces:\", length(result$pieces), \"\\n\")\ncat(\"SVG length:\", nchar(result$svg_content), \"\\n\")\ncat(\"Files:\", paste(result$files, collapse = \", \"), \"\\n\")\n```\n\nSave to a temporary script file.\n\n**Got:** An R script file saved to a temporary location containing `library(jigsawR)`, a `generate_puzzle()` call with all parameters, and diagnostic output lines.\n\n**If fail:** If the script has syntax errors, verify that all string arguments are quoted and numeric vectors use `c()`. Avoid complex shell escaping by always using script files.\n\n### Step 4: Execute via WSL R\n\n```bash\nR_EXE=\"\u002Fmnt\u002Fc\u002FProgram Files\u002FR\u002FR-4.5.0\u002Fbin\u002FRscript.exe\"\n\"$R_EXE\" \u002Fpath\u002Fto\u002Fscript.R\n```\n\n**Got:** Script completes without errors. SVG file(s) written to `output\u002F`.\n\n**If fail:** Check that renv is restored (`renv::restore()`). Verify package is loaded (`devtools::load_all()`). Do NOT use `--vanilla` flag (renv needs .Rprofile).\n\n### Step 5: Verify Output\n\n- SVG file exists in `output\u002F` directory\n- SVG content starts with `\u003C?xml` or `\u003Csvg`\n- Piece count matches expected: cols * rows (rectangular), ring formula (hex\u002Fconcentric)\n- For ggplot2 approach, verify the plot object renders without error\n\n**Got:** SVG file exists in `output\u002F`, content starts with `\u003C?xml` or `\u003Csvg`, and piece count matches the grid specification (cols * rows for rectangular, ring formula for hex\u002Fconcentric).\n\n**If fail:** If SVG file is missing, check the `output\u002F` directory exists. If piece count is wrong, verify grid dimensions match the puzzle type's expected formula. For ggplot2 output, check that the plot renders without error by wrapping in `tryCatch()`.\n\n### Step 6: Save Output\n\nGenerated files are saved to `output\u002F` by default. The `result` object contains:\n- `$svg_content` — raw SVG string\n- `$pieces` — list of piece data\n- `$canvas_size` — dimensions\n- `$files` — paths to written files\n\n**Got:** The `result` object contains `$svg_content`, `$pieces`, `$canvas_size`, and `$files` fields. Files listed in `$files` exist on disk.\n\n**If fail:** If `$files` is empty, the puzzle may have generated in-memory only. Explicitly save with `writeLines(result$svg_content, \"output\u002Fpuzzle.svg\")`.\n\n## Validation\n\n- [ ] Script executes without errors\n- [ ] SVG file is well-formed XML\n- [ ] Piece count matches grid specification\n- [ ] Same seed produces identical output (reproducibility)\n- [ ] Parameters are within config.yml constraints\n\n## Pitfalls\n\n- **Using `--vanilla` flag**: Breaks renv activation. Never use it.\n- **Complex `-e` commands**: Use script files instead; shell escaping causes Exit code 5.\n- **Grid vs size confusion**: Grid is piece count, size is physical dimensions in mm.\n- **Offset semantics**: 0 = assembled puzzle, positive = exploded\u002Fseparated pieces.\n- **SNIC without package**: snic type requires the `snic` package installed.\n\n## Related Skills\n\n- `add-puzzle-type` — scaffold a new puzzle type end-to-end\n- `validate-piles-notation` — validate fusion group strings before passing to generate_puzzle()\n- `run-puzzle-tests` — run the test suite after generation changes\n- `write-testthat-tests` — add tests for new generation scenarios\n","# Generate Puzzle\n\nGenerate jigsaw puzzles using the jigsawR package's unified API.\n\n## When to Use\n\n- Creating puzzle SVG files for a specific type and configuration\n- Testing puzzle generation with different parameters\n- Generating sample output for documentation or demos\n- Creating ggplot2 puzzle visualizations with geom_puzzle_*()\n\n## Inputs\n\n- **Required**: Puzzle type (`\"rectangular\"`, `\"hexagonal\"`, `\"concentric\"`, `\"voronoi\"`, `\"random\"`, `\"snic\"`)\n- **Required**: Grid dimensions (type-dependent: `c(cols, rows)` or `c(rings)`)\n- **Optional**: Size in mm (default varies by type)\n- **Optional**: Seed for reproducibility (default: 42)\n- **Optional**: Offset (0 = interlocked, >0 = separated pieces)\n- **Optional**: Layout (`\"grid\"` or `\"repel\"` for rectangular)\n- **Optional**: Fusion groups (PILES notation string)\n\n## Procedure\n\n### Step 1: Read Config Constraints\n\n```bash\nR_EXE=\"\u002Fmnt\u002Fc\u002FProgram Files\u002FR\u002FR-4.5.0\u002Fbin\u002FRscript.exe\"\n\"$R_EXE\" -e \"cat(yaml::yaml.load_file('inst\u002Fconfig.yml')[['{TYPE}']]$grid$max)\"\n```\n\nOr read `inst\u002Fconfig.yml` directly to check valid ranges for the chosen type.\n\n**Got:** The min\u002Fmax values for grid, size, tabsize, and other parameters are known for the chosen puzzle type.\n\n**If fail:** If `config.yml` is missing or the type key doesn't exist, check that you are in the jigsawR project root and the package has been built at least once.\n\n### Step 2: Determine Type and Parameters\n\nMap the user's request to valid `generate_puzzle()` arguments:\n\n| Type | grid | size | Extra params |\n|------|------|------|-------------|\n| rectangular | `c(cols, rows)` | `c(width, height)` mm | `offset`, `layout`, `tabsize` |\n| hexagonal | `c(rings)` | `c(diameter)` mm | `do_warp`, `do_trunc`, `tabsize` |\n| concentric | `c(rings)` | `c(diameter)` mm | `center_shape`, `tabsize` |\n| voronoi | `c(cols, rows)` | `c(width, height)` mm | `n_interior`, `tabsize` |\n| random | `c(cols, rows)` | `c(width, height)` mm | `n_interior`, `tabsize` |\n| snic | `c(cols, rows)` | `c(width, height)` mm | `n_interior`, `compactness`, `tabsize` |\n\n**Got:** User request mapped to valid `generate_puzzle()` arguments with correct `type`, `grid` dimensions, and `size` values within the ranges from config.yml.\n\n**If fail:** If unsure which parameter format to use, refer to the table above. Rectangular and voronoi types use `c(cols, rows)` for grid; hexagonal and concentric use `c(rings)`.\n\n### Step 3: Create R Script\n\nWrite a script file (preferred over `-e` for complex commands):\n\n```r\nlibrary(jigsawR)\n\nresult \u003C- generate_puzzle(\n  type = \"rectangular\",\n  seed = 42,\n  grid = c(3, 4),\n  size = c(400, 300),\n  offset = 0,\n  layout = \"grid\"\n)\n\ncat(\"Pieces:\", length(result$pieces), \"\\n\")\ncat(\"SVG length:\", nchar(result$svg_content), \"\\n\")\ncat(\"Files:\", paste(result$files, collapse = \", \"), \"\\n\")\n```\n\nSave to a temporary script file.\n\n**Got:** An R script file saved to a temporary location containing `library(jigsawR)`, a `generate_puzzle()` call with all parameters, and diagnostic output lines.\n\n**If fail:** If the script has syntax errors, verify that all string arguments are quoted and numeric vectors use `c()`. Avoid complex shell escaping by always using script files.\n\n### Step 4: Execute via WSL R\n\n```bash\nR_EXE=\"\u002Fmnt\u002Fc\u002FProgram Files\u002FR\u002FR-4.5.0\u002Fbin\u002FRscript.exe\"\n\"$R_EXE\" \u002Fpath\u002Fto\u002Fscript.R\n```\n\n**Got:** Script completes without errors. SVG file(s) written to `output\u002F`.\n\n**If fail:** Check that renv is restored (`renv::restore()`). Verify package is loaded (`devtools::load_all()`). Do NOT use `--vanilla` flag (renv needs .Rprofile).\n\n### Step 5: Verify Output\n\n- SVG file exists in `output\u002F` directory\n- SVG content starts with `\u003C?xml` or `\u003Csvg`\n- Piece count matches expected: cols * rows (rectangular), ring formula (hex\u002Fconcentric)\n- For ggplot2 approach, verify the plot object renders without error\n\n**Got:** SVG file exists in `output\u002F`, content starts with `\u003C?xml` or `\u003Csvg`, and piece count matches the grid specification (cols * rows for rectangular, ring formula for hex\u002Fconcentric).\n\n**If fail:** If SVG file is missing, check the `output\u002F` directory exists. If piece count is wrong, verify grid dimensions match the puzzle type's expected formula. For ggplot2 output, check that the plot renders without error by wrapping in `tryCatch()`.\n\n### Step 6: Save Output\n\nGenerated files are saved to `output\u002F` by default. The `result` object contains:\n- `$svg_content` — raw SVG string\n- `$pieces` — list of piece data\n- `$canvas_size` — dimensions\n- `$files` — paths to written files\n\n**Got:** The `result` object contains `$svg_content`, `$pieces`, `$canvas_size`, and `$files` fields. Files listed in `$files` exist on disk.\n\n**If fail:** If `$files` is empty, the puzzle may have generated in-memory only. Explicitly save with `writeLines(result$svg_content, \"output\u002Fpuzzle.svg\")`.\n\n## Validation\n\n- [ ] Script executes without errors\n- [ ] SVG file is well-formed XML\n- [ ] Piece count matches grid specification\n- [ ] Same seed produces identical output (reproducibility)\n- [ ] Parameters are within config.yml constraints\n\n## Pitfalls\n\n- **Using `--vanilla` flag**: Breaks renv activation. Never use it.\n- **Complex `-e` commands**: Use script files instead; shell escaping causes Exit code 5.\n- **Grid vs size confusion**: Grid is piece count, size is physical dimensions in mm.\n- **Offset semantics**: 0 = assembled puzzle, positive = exploded\u002Fseparated pieces.\n- **SNIC without package**: snic type requires the `snic` package installed.\n\n## Related Skills\n\n- `add-puzzle-type` — scaffold a new puzzle type end-to-end\n- `validate-piles-notation` — validate fusion group strings before passing to generate_puzzle()\n- `run-puzzle-tests` — run the test suite after generation changes\n- `write-testthat-tests` — add tests for new generation scenarios\n",{"name":5,"locale":23,"license":14,"metadata":24,"translator":31,"description":32,"allowed-tools":33,"source_commit":34,"source_locale":35,"translation_date":36},"caveman-lite",{"tags":25,"author":26,"domain":27,"version":28,"language":29,"complexity":30},"jigsawr, puzzle, svg, generation, ggplot2","Philipp Thoss","jigsawr","1.0","R","basic","Julius Brussee homage — caveman","Generate jigsaw puzzles via generate_puzzle() or geom_puzzle_*() with parameter validation against inst\u002Fconfig.yml. Supports rectangular, hexagonal, concentric, voronoi, and snic puzzle types with configurable grid, size, seed, offset, and layout parameters. Use when creating puzzle SVG files for a specific type and configuration, testing generation with different parameters, generating sample output for documentation or demos, or creating ggplot2 puzzle visualizations.\n","Read Write Edit Bash Grep Glob","82c77053","en","2026-04-24","master","f483e54f3ad5f202a77d45f2e57f8d970b71195f","skills_library\u002Fgenerate-puzzle",2,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills","https:\u002F\u002Fgithub.com\u002Froohe","yoou.link","2026-05-19 15:56:07",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add roohe\u002Fagentic-super-skills --skill generate-puzzle",{"tool":51,"command":52},"bunx","bunx skills add roohe\u002Fagentic-super-skills --skill generate-puzzle",{"tool":54,"command":55},"pnpm","pnpm dlx skills add roohe\u002Fagentic-super-skills --skill generate-puzzle","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fgenerate-puzzle\u002FSKILL.md",true,[],[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M73D865CZME2FCMKA4PQM348","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fzarr-python\u002FSKILL.md",[],[],{"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":18},"01M73D7Z64J4ABWZJD7P44XBBF","youtube-downloader","Download and process YouTube content for research. Use when: downloading competitor videos for analysis; extracting audio for podcasts; getting transcripts for content repurposing; archiving webinars; research content curation","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyoutube-downloader\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M73D7K8778TGZV3GJFR3703D","yc-pitch-deck","Create a compelling startup pitch deck that follows the structure proven to raise billions from top investors. Master the YC and Sequoia formats that get founders funded. Use when: **Fundraising** to create investor pitch decks; **YC application** to structure your narrative; **Demo Day prep** to craft your 2-minute pitch; **Angel investors** to communicate your opportunity; **Partnership pitches** to structure compelling asks","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyc-pitch-deck\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M73D70KJSE0E8Z28YMNNRT04","x-twitter-scraper","Use when the user needs X (Twitter) data or confirmation-gated X actions through Xquik: tweet search, user lookup, follower extraction, media download, monitoring, webhooks, MCP, SDKs, posting, likes, DMs, and profile updates. Requires a Xquik API key. Never ask for X login material.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fx-twitter-scraper\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M73D6ED01GV077R7K4NZNFZJ","write-vignette","Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-vignette\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M73D69YJR0BK3NFHE0CYG3EF","write-validation-documentation","Write IQ\u002FOQ\u002FPQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-validation-documentation\u002FSKILL.md",[],[]]