/agent-almanac:generate-puzzlefrom agent-almanac
Generates jigsaw puzzle SVGs via generate_puzzle() or geom_puzzle_*() with parameter validation. Supports rectangular, hexagonal, concentric, voronoi, and snic puzzle types.
Ships in agent-almanac. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generate jigsaw puzzles using the jigsawR package's unified API.
"rectangular", "hexagonal", "concentric", "voronoi", "random", "snic")c(cols, rows) or c(rings))"grid" or "repel" for rectangular)R_EXE="/mnt/c/Program Files/R/R-4.5.0/bin/Rscript.exe"
"$R_EXE" -e "cat(yaml::yaml.load_file('inst/config.yml')[['{TYPE}']]$grid$max)"
Or read inst/config.yml directly to check valid ranges for the chosen type.
Expected: The min/max values for grid, size, tabsize, and other parameters are known for the chosen puzzle type.
On failure: 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.
Map the user's request to valid generate_puzzle() arguments:
| Type | grid | size | Extra params |
|---|---|---|---|
| rectangular | c(cols, rows) | c(width, height) mm | offset, layout, tabsize |
| hexagonal | c(rings) | c(diameter) mm | do_warp, do_trunc, tabsize |
| concentric | c(rings) | c(diameter) mm | center_shape, tabsize |
| voronoi | c(cols, rows) | c(width, height) mm | n_interior, tabsize |
| random | c(cols, rows) | c(width, height) mm | n_interior, tabsize |
| snic | c(cols, rows) | c(width, height) mm | n_interior, compactness, tabsize |
Expected: User request mapped to valid generate_puzzle() arguments with correct type, grid dimensions, and size values within the ranges from config.yml.
On failure: 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).
Write a script file (preferred over -e for complex commands):
library(jigsawR)
result <- generate_puzzle(
type = "rectangular",
seed = 42,
grid = c(3, 4),
size = c(400, 300),
offset = 0,
layout = "grid"
)
cat("Pieces:", length(result$pieces), "\n")
cat("SVG length:", nchar(result$svg_content), "\n")
cat("Files:", paste(result$files, collapse = ", "), "\n")
Save to a temporary script file.
Expected: An R script file saved to a temporary location containing library(jigsawR), a generate_puzzle() call with all parameters, and diagnostic output lines.
On failure: 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.
R_EXE="/mnt/c/Program Files/R/R-4.5.0/bin/Rscript.exe"
"$R_EXE" /path/to/script.R
Expected: Script completes without errors. SVG file(s) written to output/.
On failure: Check that renv is restored (renv::restore()). Verify package is loaded (devtools::load_all()). Do NOT use --vanilla flag (renv needs .Rprofile).
output/ directory<?xml or <svgExpected: SVG file exists in output/, content starts with <?xml or <svg, and piece count matches the grid specification (cols * rows for rectangular, ring formula for hex/concentric).
On failure: If SVG file is missing, check the output/ 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().
Generated files are saved to output/ by default. The result object contains:
$svg_content — raw SVG string$pieces — list of piece data$canvas_size — dimensions$files — paths to written filesExpected: The result object contains $svg_content, $pieces, $canvas_size, and $files fields. Files listed in $files exist on disk.
On failure: If $files is empty, the puzzle may have generated in-memory only. Explicitly save with writeLines(result$svg_content, "output/puzzle.svg").
--vanilla flag: Breaks renv activation. Never use it.-e commands: Use script files instead; shell escaping causes Exit code 5.snic package installed.add-puzzle-type — scaffold a new puzzle type end-to-endvalidate-piles-notation — validate fusion group strings before passing to generate_puzzle()run-puzzle-tests — run the test suite after generation changeswrite-testthat-tests — add tests for new generation scenariosWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
jigsaw, puzzle-generation, svg, ggplot2, parameter-validation, r-package
Generated from the plugin's indexed repository (pjt222/agent-almanac) — no native marketplace selected
npx claudepluginhub p/pjt222-agent-almanac377 skills in this plugin
/adapt-architectureExecute structural metamorphosis using strangler fig migration, chrysalis phases, and interface preservation. Covers transformation planning, parallel running, progressive cutover, rollback design, and post-metamorphosis stabilization for system architecture evolution. Use when assess-form has classified the system as READY for transformation, when migrating from monolith to microservices, when replacing a core subsystem while dependents continue operating, or when any architectural change must be gradual rather than big-bang.
/adapticMaster skill composing the 5-step synoptic cycle for panoramic synthesis across multiple domains. Orchestrates meditate, expand-awareness, observe, awareness, integrate-gestalt, and express-insight into a coherent process that produces unified understanding rather than sequential compromise. Use when a problem genuinely spans 3+ domains and the interactions between domains matter more than depth in any one, when sequential analysis feels like compromise rather than integration, or before major architectural decisions affecting multiple stakeholders.
/add-puzzle-typeScaffold a new puzzle type across all 10+ pipeline integration points in jigsawR. Creates the core puzzle module, wires it into the unified pipeline (generation, positioning, rendering, adjacency), adds ggpuzzle geom/stat layers, updates DESCRIPTION and config.yml, extends the Shiny app, and creates a comprehensive test suite. Use when adding a completely new puzzle type to the package or following the 10-point integration checklist to ensure nothing is missed end-to-end.
Other plugins' skills for the same job