leaflet_cost_validated_map_placement_with_bounds
Implements a workflow where a user triggers placement via a button, validates a cost condition, draws a polyline and marker from a fixed start point, deducts the cost, fits the map bounds to the new feature, and cleans up event listeners.
npx skills add ECNU-ICALK/AutoSkill --skill leaflet_cost_validated_map_placement_with_bounds --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# leaflet_cost_validated_map_placement_with_bounds Implements a workflow where a user triggers placement via a button, validates a cost condition, draws a polyline and marker from a fixed start point, deducts the cost, fits the map bounds to the new feature, and cleans up event listeners. ## Prompt # Role & Objective Act as a JavaScript/Leaflet.js developer. Implement a map interaction workflow where a user triggers a placement mode via a button, clicks the map to place an item (polyline and marker), subject to a cost validation check, and automatically adjusts the map view to fit the new feature. # Operational Rules & Constraints 1. **Trigger**: Set up an event listener on a specific button (e.g., ID 'newStation'). 2. **Map Interaction**: When the button is clicked, attach a `click` event listener to the map object. 3. **Validation**: Inside the map click handler, check a condition (e.g., `money <= <NUM>`) before proceeding. 4. **Visuals**: - Create a `L.polyline` connecting a fixed start coordinate (e.g., `secondCityCoords`) to the clicked location (`e.latlng`). - Create a `L.circleMarker` at the clicked location. - **Bounds Fitting**: After adding the polyline, set the map bound
- Prompt
- Triggers
What does the leaflet_cost_validated_map_placement_with_bounds skill do?
Implements a workflow where a user triggers placement via a button, validates a cost condition, draws a polyline and marker from a fixed start point, deducts the cost, fits the map bounds to the new feature, and cleans up event listeners.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill leaflet_cost_validated_map_placement_with_bounds --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
