[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E4A6ZAFS7XGPV2YA268MNN":3,"skill-same:01M7E4A6ZAFS7XGPV2YA268MNN":46},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7E4A6ZAFS7XGPV2YA268MNN","control-cli",null,"Build or adapt a local harness to drive, inspect, and profile an interactive CLI or TUI without external services. Use for CLI UX checks, startup regressions, memory leaks, hangs, prompt flows, or terminal demos.","noodlemind\u002Fpstack-plugin","noodlemind","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F11191273?v=4","01M7E41PM9S9CBCNY8KS673J3P","Krish","01M7E41PNCWJHAVX3YBT2EHY9J",0,"MIT","https:\u002F\u002Fgithub.com\u002Fnoodlemind\u002Fpstack-plugin\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack\u002Fupstream\u002Fcursor-team-kit\u002Fskills\u002Fcontrol-cli\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: control-cli\ndescription: Build or adapt a local harness to drive, inspect, and profile an interactive CLI or TUI without external services. Use for CLI UX checks, startup regressions, memory leaks, hangs, prompt flows, or terminal demos.\n---\n\n# Control CLI\n\nUse a repeatable local harness to exercise an interactive CLI instead of poking at it manually. First reuse the repo's own test\u002Fdemo harness if it exists; otherwise assemble a temporary harness from standard local tools.\n\n## What It Is Used For\n\n- Reproducing CLI\u002FTUI bugs with deterministic input.\n- Verifying keyboard flows, prompts, interrupts, resize behavior, and terminal layout.\n- Capturing before\u002Fafter transcripts for bug fixes.\n- Profiling startup time, slow operations, hangs, or memory growth.\n- Recording a short terminal demo when output is easier to show than explain.\n\n## Harness Loop\n\n1. Identify the command under test and the smallest reproducible workspace.\n2. Discover existing local harnesses: package scripts, e2e tests, demo recorders, expect scripts, or PTY helpers.\n3. If no harness exists, launch the CLI in an isolated terminal session with deterministic env vars.\n4. Capture the current screen before interacting.\n5. Send one action at a time: text, Enter, arrows, Escape, Ctrl-C, resize.\n6. Wait for a concrete screen pattern or prompt before the next action.\n7. Save the transcript and any profile artifacts.\n8. Kill the session cleanly.\n\n## Harness Options\n\n- Repo-native harness: prefer checked-in scripts because they know the app's startup, env, and prompts.\n- `tmux`: managed sessions, `capture-pane`, `send-keys`, attach\u002Fdetach.\n- PTY probe: use a short Python, Node, or Expect script when tmux is unavailable.\n- Runtime inspector: use Node or Bun inspector for CPU profiles, heap snapshots, and live evaluation.\n- Terminal recorder: use repo-local demo tools or asciinema-compatible tools when the user asks for a demo.\n\n## Minimal tmux Harness\n\n```bash\nSESSION=\"cli-harness-$(date +%s)\"\ntmux new-session -d -s \"$SESSION\" -- \u003Ccommand-under-test>\ntmux capture-pane -pt \"$SESSION\"\ntmux send-keys -t \"$SESSION\" \"help\" Enter\ntmux capture-pane -pt \"$SESSION\"\ntmux kill-session -t \"$SESSION\"\n```\n\nFor Node CLIs:\n\n```bash\nNODE_OPTIONS=\"--inspect=127.0.0.1:0\" tmux new-session -d -s \"$SESSION\" -- \u003Cnode-cli-command>\n```\n\nRead the terminal output to find the inspector URL, then use Chrome DevTools-compatible tooling if profiling is needed.\n\n## Minimal PTY Harness\n\nUse a PTY script when you need deterministic waits in a repo that does not have tmux or a demo harness. Keep it temporary unless the user asks to add a reusable test.\n\n```python\nimport os\nimport pty\nimport select\nimport subprocess\nimport time\n\nmaster_fd, slave_fd = pty.openpty()\nproc = subprocess.Popen(\n    [\"\u003Ccommand>\", \"\u003Carg>\"],\n    stdin=slave_fd,\n    stdout=slave_fd,\n    stderr=slave_fd,\n    close_fds=True,\n)\nos.close(slave_fd)\n\ndeadline = time.time() + 30\nbuffer = b\"\"\nwhile time.time() \u003C deadline:\n    ready, _, _ = select.select([master_fd], [], [], 0.25)\n    if not ready:\n        continue\n    chunk = os.read(master_fd, 4096)\n    buffer += chunk\n    if b\"\u003Cready text>\" in buffer:\n        os.write(master_fd, b\"help\\n\")\n        break\n\nprint(buffer.decode(errors=\"replace\"))\nproc.terminate()\nos.close(master_fd)\n```\n\nIf the CLI needs richer terminal control, use `pty.fork()` or an existing PTY library.\n\n## Profiling Recipes\n\n- Startup regression: capture baseline and treatment startup timings under the same machine, env, and command.\n- Slow operation: start a CPU profile, perform the operation, stop the profile, and compare top self-time functions.\n- Memory leak: force GC if available, take a heap snapshot, perform the operation repeatedly, force GC again, and take another snapshot.\n- Hang: capture the screen, active handles\u002Fresources, and a stack\u002FCPU sample before interrupting.\n\n## Guardrails\n\n- Prefer deterministic waits over sleeps. If you must sleep, explain why.\n- Do not send credentials or destructive commands into a controlled session.\n- Keep the harness in `\u002Ftmp` unless the repo already has a testing\u002Fdemo harness.\n- Do not hard-code paths from another repository. Adapt commands to the current repo's scripts and runtime.\n- Clean up tmux sessions, temp dirs, inspector processes, and demo artifacts unless the user asks to keep them.\n","# Control CLI\n\nUse a repeatable local harness to exercise an interactive CLI instead of poking at it manually. First reuse the repo's own test\u002Fdemo harness if it exists; otherwise assemble a temporary harness from standard local tools.\n\n## What It Is Used For\n\n- Reproducing CLI\u002FTUI bugs with deterministic input.\n- Verifying keyboard flows, prompts, interrupts, resize behavior, and terminal layout.\n- Capturing before\u002Fafter transcripts for bug fixes.\n- Profiling startup time, slow operations, hangs, or memory growth.\n- Recording a short terminal demo when output is easier to show than explain.\n\n## Harness Loop\n\n1. Identify the command under test and the smallest reproducible workspace.\n2. Discover existing local harnesses: package scripts, e2e tests, demo recorders, expect scripts, or PTY helpers.\n3. If no harness exists, launch the CLI in an isolated terminal session with deterministic env vars.\n4. Capture the current screen before interacting.\n5. Send one action at a time: text, Enter, arrows, Escape, Ctrl-C, resize.\n6. Wait for a concrete screen pattern or prompt before the next action.\n7. Save the transcript and any profile artifacts.\n8. Kill the session cleanly.\n\n## Harness Options\n\n- Repo-native harness: prefer checked-in scripts because they know the app's startup, env, and prompts.\n- `tmux`: managed sessions, `capture-pane`, `send-keys`, attach\u002Fdetach.\n- PTY probe: use a short Python, Node, or Expect script when tmux is unavailable.\n- Runtime inspector: use Node or Bun inspector for CPU profiles, heap snapshots, and live evaluation.\n- Terminal recorder: use repo-local demo tools or asciinema-compatible tools when the user asks for a demo.\n\n## Minimal tmux Harness\n\n```bash\nSESSION=\"cli-harness-$(date +%s)\"\ntmux new-session -d -s \"$SESSION\" -- \u003Ccommand-under-test>\ntmux capture-pane -pt \"$SESSION\"\ntmux send-keys -t \"$SESSION\" \"help\" Enter\ntmux capture-pane -pt \"$SESSION\"\ntmux kill-session -t \"$SESSION\"\n```\n\nFor Node CLIs:\n\n```bash\nNODE_OPTIONS=\"--inspect=127.0.0.1:0\" tmux new-session -d -s \"$SESSION\" -- \u003Cnode-cli-command>\n```\n\nRead the terminal output to find the inspector URL, then use Chrome DevTools-compatible tooling if profiling is needed.\n\n## Minimal PTY Harness\n\nUse a PTY script when you need deterministic waits in a repo that does not have tmux or a demo harness. Keep it temporary unless the user asks to add a reusable test.\n\n```python\nimport os\nimport pty\nimport select\nimport subprocess\nimport time\n\nmaster_fd, slave_fd = pty.openpty()\nproc = subprocess.Popen(\n    [\"\u003Ccommand>\", \"\u003Carg>\"],\n    stdin=slave_fd,\n    stdout=slave_fd,\n    stderr=slave_fd,\n    close_fds=True,\n)\nos.close(slave_fd)\n\ndeadline = time.time() + 30\nbuffer = b\"\"\nwhile time.time() \u003C deadline:\n    ready, _, _ = select.select([master_fd], [], [], 0.25)\n    if not ready:\n        continue\n    chunk = os.read(master_fd, 4096)\n    buffer += chunk\n    if b\"\u003Cready text>\" in buffer:\n        os.write(master_fd, b\"help\\n\")\n        break\n\nprint(buffer.decode(errors=\"replace\"))\nproc.terminate()\nos.close(master_fd)\n```\n\nIf the CLI needs richer terminal control, use `pty.fork()` or an existing PTY library.\n\n## Profiling Recipes\n\n- Startup regression: capture baseline and treatment startup timings under the same machine, env, and command.\n- Slow operation: start a CPU profile, perform the operation, stop the profile, and compare top self-time functions.\n- Memory leak: force GC if available, take a heap snapshot, perform the operation repeatedly, force GC again, and take another snapshot.\n- Hang: capture the screen, active handles\u002Fresources, and a stack\u002FCPU sample before interrupting.\n\n## Guardrails\n\n- Prefer deterministic waits over sleeps. If you must sleep, explain why.\n- Do not send credentials or destructive commands into a controlled session.\n- Keep the harness in `\u002Ftmp` unless the repo already has a testing\u002Fdemo harness.\n- Do not hard-code paths from another repository. Adapt commands to the current repo's scripts and runtime.\n- Clean up tmux sessions, temp dirs, inspector processes, and demo artifacts unless the user asks to keep them.\n",{"name":5,"description":7},"main","1de79df0a03cf5abd07b4720dad71eaeae3e7932","plugins\u002Fpstack\u002Fupstream\u002Fcursor-team-kit\u002Fskills\u002Fcontrol-cli","https:\u002F\u002Fgithub.com\u002Fnoodlemind\u002Fpstack-plugin","https:\u002F\u002Fgithub.com\u002Fnoodlemind","https;\u002F\u002Fclype.io","Consultant and Tech Enthusiast.\r\nCurrently working full time as a Consultant while trying to implement projects that are ideas that help me and others","2026-10-26 03:33:24",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add noodlemind\u002Fpstack-plugin --skill control-cli",{"tool":38,"command":39},"bunx","bunx skills add noodlemind\u002Fpstack-plugin --skill control-cli",{"tool":41,"command":42},"pnpm","pnpm dlx skills add noodlemind\u002Fpstack-plugin --skill control-cli","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnoodlemind\u002Fpstack-plugin\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack\u002Fupstream\u002Fcursor-team-kit\u002Fskills\u002Fcontrol-cli\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"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},"01M7E4H439JB3MTMEAPC9AC6N6","why","Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.","https:\u002F\u002Fgithub.com\u002Fnoodlemind\u002Fpstack-plugin\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack\u002Fupstream\u002Fpstack\u002Fskills\u002Fwhy\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},"01M7E4H2ATPM61ZE99YAH9T89G","unslop","Cut AI tells from any writing. Must always apply.","https:\u002F\u002Fgithub.com\u002Fnoodlemind\u002Fpstack-plugin\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack\u002Fupstream\u002Fpstack\u002Fskills\u002Funslop\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},"01M7E4H0F6HEWTM6FCDGGE7QEW","typescript-best-practices","TypeScript best practices. Use when reading or editing any .ts or .tsx file.","https:\u002F\u002Fgithub.com\u002Fnoodlemind\u002Fpstack-plugin\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack\u002Fupstream\u002Fpstack\u002Fskills\u002Ftypescript-best-practices\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},"01M7E4GW03P6Z32YM4VBRJ74Y8","technical-writing","Layered technical-writing standard: Diátaxis structure, Google developer style sentences, STE instruction rules, Global English syntax. Use for \u002Ftechnical-writing or when writing or reviewing docs, RFCs, readmes, PR descriptions, or commit messages.","https:\u002F\u002Fgithub.com\u002Fnoodlemind\u002Fpstack-plugin\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack\u002Fupstream\u002Fpstack\u002Fskills\u002Ftechnical-writing\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},"01M7E4GRSBXHW5MF0BQKP44FM0","teach","Explain a body of work plainly so a person actually understands it. Runs the `how` and `why` skills and weaves what they find into one clear explanation. Use for 'teach me this', 'help me really understand X', 'explain this change or subsystem to me'.","https:\u002F\u002Fgithub.com\u002Fnoodlemind\u002Fpstack-plugin\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack\u002Fupstream\u002Fpstack\u002Fskills\u002Fteach\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},"01M7E4GNRP62R9AS2S435B545N","tdd","Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested.","https:\u002F\u002Fgithub.com\u002Fnoodlemind\u002Fpstack-plugin\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack\u002Fupstream\u002Fpstack\u002Fskills\u002Ftdd\u002FSKILL.md",[],[]]