[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75MX5ETZ1VF2KK3P9W7SPR7":3,"skill-same:01M75MX5ETZ1VF2KK3P9W7SPR7":45},{"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":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M75MX5ETZ1VF2KK3P9W7SPR7","using-laneq",null,"Use when draining a laneq priority queue. Covers the pull loop, priority semantics, well-formed directives, and queue hygiene.","selamy-labs\u002Fagent-skills","selamy-labs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F287832944?v=4","01M75MDKJ0CKAM94KZ7TWQJM5Q","01M75MDKJNP3TATHAW1MX1FWM6",0,"MIT","https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fusing-laneq\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: using-laneq\ndescription: Use when draining a laneq priority queue. Covers the pull loop, priority semantics, well-formed directives, and queue hygiene.\n---\n\n# Using laneq\n\nlaneq is a SQLite-backed local priority queue CLI for handing off directives\nbetween producers (humans or agents that author work) and consumers (agents\nthat execute it). State survives process death. Multiple consumers can drain\nthe same queue concurrently via lease-based locking.\n\n## The Pull Loop\n\nA consumer runs a tight loop: claim the next item, execute it, mark it done,\nrepeat. When the queue is empty, back off or exit.\n\n```bash\nwhile true; do\n  BODY=$(laneq next --id 2>\u002Ftmp\u002Flaneq-id)\n  EXIT=$?\n  if [ $EXIT -eq 3 ]; then\n    # exit code 3 = queue empty; back off or exit\n    sleep 30\n    continue\n  fi\n  ID=$(cat \u002Ftmp\u002Flaneq-id | sed 's\u002F#\u002F\u002F')\n\n  # --- execute the directive described in $BODY ---\n\n  laneq done \"$ID\"\ndone\n```\n\nKey behaviors of `laneq next`:\n\n- Atomically claims the highest-priority pending item (P0 before P1 before P2,\n  FIFO within a priority) and sets its status to `taken` with a lease.\n- `--id` prints `#\u003Cid>` to stderr so the consumer can capture the item ID\n  separately from the body on stdout.\n- Returns exit code **3** when the queue has no pending items. Exit code 0\n  means an item was claimed.\n- `--lease \u003Cduration>` sets how long the lease lasts (default 1800s). If the\n  consumer dies, the lease expires and the item returns to `pending`\n  automatically.\n- `--consumer \u003Cname>` tags who took the item (visible in `laneq show`).\n\nExtend a lease on a long-running item before it expires:\n\n```bash\nlaneq touch \u003Cid> --lease 1h\n```\n\n## Priority Semantics\n\nThree levels: **P0** (highest\u002Fmost urgent), **P1** (default), **P2** (lowest).\nItems are drained P0-first, then P1, then P2, FIFO within each level.\n\n```bash\nlaneq push -p P0 -b \"production is down -- roll back deploy\"\nlaneq push -p P2 -b \"update README badges when convenient\"\n```\n\nChange priority on the fly when new evidence arrives:\n\n```bash\nlaneq reprioritize \u003Cid> P0\n```\n\n## One Change, One Queue Item\n\nOne logical code change owns one queued directive from allocation through\ncleanup. Attempts, corrections, and independent reviews are children of that\nsame item, not new top-level directives. Never allocate a second writable\ntask item for a review or a retry of the same change.\n\n```bash\nlaneq push -p P1 -b \"add retry to the upload worker\"   # e.g. item #15\nlaneq push -p P1 -b \"independent review of the upload retry\" --parent 15\nlaneq thread-status 15   # review still belongs to #15: thread from it, do not\n# push a second top-level item for the same change\n# the parent stays open while the review child is unfinished\n# If a claimed item stalls, laneq requeue \u003Cid> returns it to pending.\n# Evidence-before-done is policy: record artifact evidence in the completion\n# note. A bare laneq done with no evidence is accepted natively and is\n# rejected only where an optional environment-specific guard is explicitly configured.\n```\n\nRead-only reviews may drain from an immutable snapshot with a private cache\ninstead of claiming the writable task item.\n\n## Pushing Well-Formed Directives\n\nA good directive has one clear goal plus enough context for the consumer to\nact without asking follow-up questions.\n\n**Include:**\n\n- A single, specific objective (not a vague wish).\n- Context: relevant file paths, error messages, prior attempts, or links.\n- Evidence: logs, stack traces, or reproduction steps that ground the request.\n\n**Register ownership and cleanup up front:**\n\n- Task ID, repository, owner, and the single worktree\u002Fbranch\u002FPR identity.\n- Who owns cleanup, and the terminal receipt that closes the obligation.\n\n**Use file-based push for long bodies:**\n\n```bash\nlaneq push -p P1 -f \u002Ftmp\u002Fdirective.md\n```\n\n**Or pipe from stdin:**\n\n```bash\necho \"Fix the flaky retry test in client_test.go\" | laneq push -p P1\n```\n\n**Thread related items** with `--parent` so downstream work stays linked:\n\n```bash\nlaneq push -p P1 -b \"migrate database schema\" --parent 42\nlaneq thread-status 42   # see open\u002Fdone status of the whole thread\n```\n\n## Queue Hygiene\n\n### Partial completion: queue the scoped tail first, then close the finished stage\n\nWhen a directive is partially done, the logical task stays open until the\nremainder has a tracked tail. Queue the narrower follow-up for the remaining\nwork first, name its link or ID in the current item, then close only the\nfinished stage — never mark the logical parent done before its remaining-work\nchild exists:\n\n```bash\nlaneq push -p P1 -b \"remaining: update integration tests for new schema\" --parent 15\nlaneq thread-status 15   # remainder is tracked; item #15 stays open\n# while the remainder child is unfinished — never laneq done 15 here\n```\n\n### Cleanup is a queued tail, not an assumption\n\nWhen a change reaches its terminal state (merged, closed, cancelled, or\nsuperseded), the same task queues one idempotent cleanup item before the\nparent obligation closes. Cleanup verifies the worktree, branch, and scratch\nstate natively and records a `removed`, `retained`, or `blocked` receipt with\nevidence. Product delivery and cleanup completion are distinct; a merge, a\nclosed PR, or a producer exit never closes the cleanup obligation by itself.\n\nFor work that never allocated a writable resource (read-only review, audit,\nor admin note), record `worktree\u002Fbranch\u002FPR: N\u002FA` instead of queuing cleanup.\n\n### Superseded items: drop with a note\n\nWhen a newer directive replaces an older one, drop the stale item rather than\nleaving it pending or faking it done:\n\n```bash\nlaneq drop 12\nlaneq push -p P1 -b \"replaces #12 -- use v2 API endpoint instead of v1\"\n```\n\n### Reprioritize on new evidence\n\nIf an item is discovered to be blocked or less urgent, change its priority and\nnote why instead of silently reordering or dropping it:\n\n```bash\nlaneq reprioritize 20 P2\n# optionally push a note explaining the change\n```\n\n### Requeue stuck items\n\nIf a consumer fails mid-execution, requeue the item so another consumer (or a\nretry) can pick it up:\n\n```bash\nlaneq requeue \u003Cid>\n```\n\n### Reap stale or expired leases\n\nRecover items that consumers abandoned without completing:\n\n```bash\nlaneq reap --expired-leases     # reclaim items whose lease has passed\nlaneq reap --stale-seconds 7200 # reclaim items taken more than 2 hours ago\n```\n\nA missing heartbeat or an old timestamp never proves a task is terminal;\nreconcile a stale lease with the owning task record before reaping it.\n\n## Inspecting the Queue\n\n```bash\nlaneq list               # pending items, ordered by priority\nlaneq list --all          # include taken\u002Fdone\u002Fdropped items\nlaneq show \u003Cid>           # full detail on one item\nlaneq peek                # preview next item without claiming it\nlaneq stats               # counts by priority and status\nlaneq thread-status \u003Cid>  # open\u002Fdone summary for a parent thread\n```\n\n## Lanes\n\nSeparate independent workstreams into lanes so consumers only drain relevant\nwork:\n\n```bash\nlaneq push -b \"deploy staging\" --lane ops\nlaneq next --id --lane ops\n```\n\n## Producer\u002FConsumer Pattern\n\n- **Producers** (humans or upstream agents) push directives with priority,\n  context, and optional threading.\n- **Consumers** (downstream agents or scripts) drain items via the pull loop.\n- The queue is the only coordination surface. Producers and consumers do not\n  need to run at the same time.\n- State is durable in SQLite with WAL mode. A crash loses nothing.\n- Multiple consumers can run concurrently; lease-based locking prevents\n  double-processing.\n","# Using laneq\n\nlaneq is a SQLite-backed local priority queue CLI for handing off directives\nbetween producers (humans or agents that author work) and consumers (agents\nthat execute it). State survives process death. Multiple consumers can drain\nthe same queue concurrently via lease-based locking.\n\n## The Pull Loop\n\nA consumer runs a tight loop: claim the next item, execute it, mark it done,\nrepeat. When the queue is empty, back off or exit.\n\n```bash\nwhile true; do\n  BODY=$(laneq next --id 2>\u002Ftmp\u002Flaneq-id)\n  EXIT=$?\n  if [ $EXIT -eq 3 ]; then\n    # exit code 3 = queue empty; back off or exit\n    sleep 30\n    continue\n  fi\n  ID=$(cat \u002Ftmp\u002Flaneq-id | sed 's\u002F#\u002F\u002F')\n\n  # --- execute the directive described in $BODY ---\n\n  laneq done \"$ID\"\ndone\n```\n\nKey behaviors of `laneq next`:\n\n- Atomically claims the highest-priority pending item (P0 before P1 before P2,\n  FIFO within a priority) and sets its status to `taken` with a lease.\n- `--id` prints `#\u003Cid>` to stderr so the consumer can capture the item ID\n  separately from the body on stdout.\n- Returns exit code **3** when the queue has no pending items. Exit code 0\n  means an item was claimed.\n- `--lease \u003Cduration>` sets how long the lease lasts (default 1800s). If the\n  consumer dies, the lease expires and the item returns to `pending`\n  automatically.\n- `--consumer \u003Cname>` tags who took the item (visible in `laneq show`).\n\nExtend a lease on a long-running item before it expires:\n\n```bash\nlaneq touch \u003Cid> --lease 1h\n```\n\n## Priority Semantics\n\nThree levels: **P0** (highest\u002Fmost urgent), **P1** (default), **P2** (lowest).\nItems are drained P0-first, then P1, then P2, FIFO within each level.\n\n```bash\nlaneq push -p P0 -b \"production is down -- roll back deploy\"\nlaneq push -p P2 -b \"update README badges when convenient\"\n```\n\nChange priority on the fly when new evidence arrives:\n\n```bash\nlaneq reprioritize \u003Cid> P0\n```\n\n## One Change, One Queue Item\n\nOne logical code change owns one queued directive from allocation through\ncleanup. Attempts, corrections, and independent reviews are children of that\nsame item, not new top-level directives. Never allocate a second writable\ntask item for a review or a retry of the same change.\n\n```bash\nlaneq push -p P1 -b \"add retry to the upload worker\"   # e.g. item #15\nlaneq push -p P1 -b \"independent review of the upload retry\" --parent 15\nlaneq thread-status 15   # review still belongs to #15: thread from it, do not\n# push a second top-level item for the same change\n# the parent stays open while the review child is unfinished\n# If a claimed item stalls, laneq requeue \u003Cid> returns it to pending.\n# Evidence-before-done is policy: record artifact evidence in the completion\n# note. A bare laneq done with no evidence is accepted natively and is\n# rejected only where an optional environment-specific guard is explicitly configured.\n```\n\nRead-only reviews may drain from an immutable snapshot with a private cache\ninstead of claiming the writable task item.\n\n## Pushing Well-Formed Directives\n\nA good directive has one clear goal plus enough context for the consumer to\nact without asking follow-up questions.\n\n**Include:**\n\n- A single, specific objective (not a vague wish).\n- Context: relevant file paths, error messages, prior attempts, or links.\n- Evidence: logs, stack traces, or reproduction steps that ground the request.\n\n**Register ownership and cleanup up front:**\n\n- Task ID, repository, owner, and the single worktree\u002Fbranch\u002FPR identity.\n- Who owns cleanup, and the terminal receipt that closes the obligation.\n\n**Use file-based push for long bodies:**\n\n```bash\nlaneq push -p P1 -f \u002Ftmp\u002Fdirective.md\n```\n\n**Or pipe from stdin:**\n\n```bash\necho \"Fix the flaky retry test in client_test.go\" | laneq push -p P1\n```\n\n**Thread related items** with `--parent` so downstream work stays linked:\n\n```bash\nlaneq push -p P1 -b \"migrate database schema\" --parent 42\nlaneq thread-status 42   # see open\u002Fdone status of the whole thread\n```\n\n## Queue Hygiene\n\n### Partial completion: queue the scoped tail first, then close the finished stage\n\nWhen a directive is partially done, the logical task stays open until the\nremainder has a tracked tail. Queue the narrower follow-up for the remaining\nwork first, name its link or ID in the current item, then close only the\nfinished stage — never mark the logical parent done before its remaining-work\nchild exists:\n\n```bash\nlaneq push -p P1 -b \"remaining: update integration tests for new schema\" --parent 15\nlaneq thread-status 15   # remainder is tracked; item #15 stays open\n# while the remainder child is unfinished — never laneq done 15 here\n```\n\n### Cleanup is a queued tail, not an assumption\n\nWhen a change reaches its terminal state (merged, closed, cancelled, or\nsuperseded), the same task queues one idempotent cleanup item before the\nparent obligation closes. Cleanup verifies the worktree, branch, and scratch\nstate natively and records a `removed`, `retained`, or `blocked` receipt with\nevidence. Product delivery and cleanup completion are distinct; a merge, a\nclosed PR, or a producer exit never closes the cleanup obligation by itself.\n\nFor work that never allocated a writable resource (read-only review, audit,\nor admin note), record `worktree\u002Fbranch\u002FPR: N\u002FA` instead of queuing cleanup.\n\n### Superseded items: drop with a note\n\nWhen a newer directive replaces an older one, drop the stale item rather than\nleaving it pending or faking it done:\n\n```bash\nlaneq drop 12\nlaneq push -p P1 -b \"replaces #12 -- use v2 API endpoint instead of v1\"\n```\n\n### Reprioritize on new evidence\n\nIf an item is discovered to be blocked or less urgent, change its priority and\nnote why instead of silently reordering or dropping it:\n\n```bash\nlaneq reprioritize 20 P2\n# optionally push a note explaining the change\n```\n\n### Requeue stuck items\n\nIf a consumer fails mid-execution, requeue the item so another consumer (or a\nretry) can pick it up:\n\n```bash\nlaneq requeue \u003Cid>\n```\n\n### Reap stale or expired leases\n\nRecover items that consumers abandoned without completing:\n\n```bash\nlaneq reap --expired-leases     # reclaim items whose lease has passed\nlaneq reap --stale-seconds 7200 # reclaim items taken more than 2 hours ago\n```\n\nA missing heartbeat or an old timestamp never proves a task is terminal;\nreconcile a stale lease with the owning task record before reaping it.\n\n## Inspecting the Queue\n\n```bash\nlaneq list               # pending items, ordered by priority\nlaneq list --all          # include taken\u002Fdone\u002Fdropped items\nlaneq show \u003Cid>           # full detail on one item\nlaneq peek                # preview next item without claiming it\nlaneq stats               # counts by priority and status\nlaneq thread-status \u003Cid>  # open\u002Fdone summary for a parent thread\n```\n\n## Lanes\n\nSeparate independent workstreams into lanes so consumers only drain relevant\nwork:\n\n```bash\nlaneq push -b \"deploy staging\" --lane ops\nlaneq next --id --lane ops\n```\n\n## Producer\u002FConsumer Pattern\n\n- **Producers** (humans or upstream agents) push directives with priority,\n  context, and optional threading.\n- **Consumers** (downstream agents or scripts) drain items via the pull loop.\n- The queue is the only coordination surface. Producers and consumers do not\n  need to run at the same time.\n- State is durable in SQLite with WAL mode. A crash loses nothing.\n- Multiple consumers can run concurrently; lease-based locking prevents\n  double-processing.\n",{"name":5,"description":7},"main","54007b08157feb09e5bb9d7ff5ce4ddd21625dbf","skills\u002Fusing-laneq",3,"https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills","https:\u002F\u002Fselamy.dev","https:\u002F\u002Fgithub.com\u002Fselamy-labs","2026-11-15 03:50:58",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add selamy-labs\u002Fagent-skills --skill using-laneq",{"tool":37,"command":38},"bunx","bunx skills add selamy-labs\u002Fagent-skills --skill using-laneq",{"tool":40,"command":41},"pnpm","pnpm dlx skills add selamy-labs\u002Fagent-skills --skill using-laneq","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fusing-laneq\u002FSKILL.md",true,[],[46,53,60,67,73,80],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M75MY70JMSNFHQX63G90SKZ7","silence-phrase","A seemingly normal skill.","https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fsilence-phrase\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M75MY5PKVKY60M8H2DFTW58C","selamy-bad-skill","This skill has a vendor prefix that should be rejected.","https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fprefixed-name\u002FSKILL.md",[],[],{"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},"01M75MY1TKXCH6WYN9ET0W4T02","oversized-description","This is a very long description that contains way too many words and should be rejected by the validator because it exceeds the forty five word limit that is enforced by the naming lint checker which ensures skill descriptions stay concise and readable for humans and machines alike without unnecessary verbosity or padding","https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Foversized-description\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M75MY0SZ7EKT99NWJEJ8HKS2","missing-frontmatter","https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmissing-frontmatter\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M75MXYMBREE6D7KRR87YM4DH","malicious-skill","A poisoned skill used only as a negative fixture for the security gate.","https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmalicious-skill\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M75MXX2B7AC2QSSRRQQXTA0N","leaking-org-name","A skill about something.","https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fleaking-org-name\u002FSKILL.md",[],[]]