[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BVH7XMDT5NJMQPHRQE9FFP":3,"skill-same:01M7BVH7XMDT5NJMQPHRQE9FFP":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},"01M7BVH7XMDT5NJMQPHRQE9FFP","pylance-python-profiling",null,"Use when the user wants to profile Python code with Pylance: capture CPU time (Tachyon), trace calls (sys.monitoring), or memory (Memray); profile a whole run or a specific region between two source locations; add sub-region markers; and explore the resulting profile (hot functions, call trees, time slices). Also use for the 3.15+ interpreter requirement and related error guidance.","nguyenhungtran18\u002Fskill-and-tool-tracker","nguyenhungtran18","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F297063550?v=4","01M7BV0BFPRRFP84F2ME0FYZ9D","01M7BV0BG83FA5P22NJV0GR0A5",1,"MIT","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fpylance-python-profiling\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: pylance-python-profiling\ndescription: 'Use when the user wants to profile Python code with Pylance: capture CPU time (Tachyon), trace calls (sys.monitoring), or memory (Memray); profile a whole run or a specific region between two source locations; add sub-region markers; and explore the resulting profile (hot functions, call trees, time slices). Also use for the 3.15+ interpreter requirement and related error guidance.'\n---\n\n# Pylance Python Profiling\n\nUse this skill to drive the `pylancePythonProfiling` capture tool and the `pylancePythonProfileExplorer`\nanalysis tool. Capture produces artifacts on disk plus a sidecar metadata JSON; the explorer loads that\nmetadata and answers paged queries (hot functions, call tree, time-sliced views).\n\n## Tools\n\n-   `pylancePythonProfiling` — start\u002Fstop captures and inspect sessions. One `action` per call.\n-   `pylancePythonProfileExplorer` — load a capture's metadata JSON and query it.\n\nRun `{\"action\":\"help\"}` on either tool to print its full surface.\n\n## Verified Tool Facts\n\n-   Backends: CPU = `profiling.sampling` (Tachyon), Trace = `sys.monitoring`, Memory = Memray.\n-   **CPU profiling requires Python 3.15+.** The tool resolves the workspace-selected interpreter (same\n    resolution as the other Pylance MCP tools). If it is below 3.15, capture returns a structured error\n    naming the selected version. Fix by selecting a 3.15+ interpreter or passing `pythonPath` explicitly.\n-   Trace and Memory work on older interpreters (Trace needs 3.12+ for `sys.monitoring`).\n-   Every capture returns a `profilingSessionId` immediately and writes artifacts under an `artifactsDir`,\n    including a `*.metadata.json` sidecar. Pass that metadata path to the explorer, not the raw binary.\n-   Captures own their own session lifecycle; they do not require `pylancePythonDebug`.\n-   The injected handshake and sampler wrapper are code **we add on the fly** — the user's source is never\n    edited. Region boundaries and markers are expressed as `file:line`.\n\n## Actions (`pylancePythonProfiling`)\n\n| `action`           | Purpose                                                                |\n| ------------------ | ---------------------------------------------------------------------- |\n| `list`             | Show active\u002Fcompleted sessions.                                        |\n| `status`           | Inspect one session (`profilingSessionId`).                            |\n| `startCpu`         | CPU capture. `mode:\"launch\"` (script\u002Fmodule) or `mode:\"attach\"` (pid). |\n| `startCpuRegion`   | CPU capture of one region only (launch mode). See below.               |\n| `stopCpu`          | Stop\u002Ffinalize a CPU session; returns saved artifact paths.             |\n| `startTracing`     | `sys.monitoring` trace of a script\u002Fmodule (launch only).               |\n| `stopTracing`      | Cooperative stop for a trace session.                                  |\n| `takeHeapSnapshot` | One-shot Memray capture.                                               |\n| `stop`             | Terminate a session and drop it from the in-memory list.               |\n| `help`             | Print full help.                                                       |\n\nCPU sampling options (apply to `startCpu` and `startCpuRegion`): `samplingRate` (e.g. `\"1khz\"`),\n`duration` (seconds), `samplingMode` (`wall|cpu|gil|exception`, default `cpu`), `allThreads`, `native`,\n`noGc`, `opcodes`, `blocking`, `subprocesses`.\n\n## Scenario 1 — Profile a whole run\n\nLaunch a script under the CPU sampler, then load the result:\n\n```json\n{\n    \"action\": \"startCpu\",\n    \"mode\": \"launch\",\n    \"script\": \"\u002Fpath\u002Fto\u002Fapp.py\",\n    \"pythonPath\": \"\u002Fpath\u002Fto\u002Fpython\",\n    \"samplingRate\": \"1khz\"\n}\n```\n\nAttach to an already-running process instead:\n\n```json\n{ \"action\": \"startCpu\", \"mode\": \"attach\", \"pid\": 12345, \"pythonPath\": \"\u002Fpath\u002Fto\u002Fpython\" }\n```\n\nBound an attach by wall-clock time:\n\n```json\n{ \"action\": \"startCpu\", \"mode\": \"attach\", \"pid\": 12345, \"samplingMode\": \"wall\", \"duration\": 30 }\n```\n\nWhen done (launch captures finalize on their own; attach\u002Fduration captures too), retrieve artifacts:\n\n```json\n{ \"action\": \"stopCpu\", \"profilingSessionId\": \"pyprof-...\" }\n```\n\n## Scenario 2 — Profile a specific region (`startCpuRegion`)\n\nUse this when only part of a run matters (a hot function, a request handler) and you want the sampler live\nfrom the region's first instruction with no attach-latency contamination. Launch mode only.\n\n```json\n{\n    \"action\": \"startCpuRegion\",\n    \"mode\": \"launch\",\n    \"script\": \"\u002Fpath\u002Fto\u002Fapp.py\",\n    \"pythonPath\": \"\u002Fpath\u002Fto\u002Fpython\",\n    \"regionStartLocation\": \"app.py:42\",\n    \"regionStopLocation\": \"app.py:88\"\n}\n```\n\nHow it works (no user code edits):\n\n1. The target launches under an injected handshake. When execution first reaches `regionStartLocation`\n   the target parks.\n2. Tachyon attaches to the parked target, then the target is released — so the region is sampled from its\n   first instruction. Attach cost is paid while parked, outside the measured region.\n3. When execution reaches `regionStopLocation`, the sampler is detached and its data flushed before the\n   target resumes its tail.\n\nRegion bounds are recorded in metadata as `region.startTimeMs`\u002F`region.endTimeMs`, so the explorer can\nslice CPU views exactly to the region with `startTimeMs`\u002F`endTimeMs`.\n\nGuidance:\n\n-   Locations are `file:line`; relative paths resolve against the target's working directory.\n-   The start line must actually execute, or the region never starts (the tool reports the target exited\n    before reaching the start location).\n-   Use `stopCpu` to fetch artifacts or to stop early.\n\n## Scenario 3 — Sub-region markers\n\nMarkers label points **inside** the region without parking or re-attaching. Use them to break one attach\ninto several labeled sub-regions (cheaper than many tiny `startCpuRegion` calls) and to annotate phases.\n\nPass `regionMarkers` as `\"label@file:line\"` (or just `\"file:line\"`):\n\n```json\n{\n    \"action\": \"startCpuRegion\",\n    \"mode\": \"launch\",\n    \"script\": \"\u002Fpath\u002Fto\u002Fapp.py\",\n    \"pythonPath\": \"\u002Fpath\u002Fto\u002Fpython\",\n    \"regionStartLocation\": \"app.py:42\",\n    \"regionStopLocation\": \"app.py:88\",\n    \"regionMarkers\": [\"load@app.py:50\", \"compute@app.py:64\", \"render@app.py:80\"]\n}\n```\n\nEach time execution reaches a marker line inside the region, a labeled timestamp (ms from region start) is\nrecorded. The explorer surfaces them under `region.markers`; use adjacent marker times as\n`startTimeMs`\u002F`endTimeMs` to slice a sub-region.\n\n## Scenario 4 — Trace and memory\n\n```json\n{\"action\":\"startTracing\",\"mode\":\"launch\",\"module\":\"mypackage.app\",\"pythonPath\":\"\u002Fpath\u002Fto\u002Fpython\"}\n{\"action\":\"stopTracing\",\"profilingSessionId\":\"pyprof-...\"}\n```\n\n```json\n{\n    \"action\": \"takeHeapSnapshot\",\n    \"mode\": \"launch\",\n    \"script\": \"\u002Fpath\u002Fto\u002Fapp.py\",\n    \"pythonPath\": \"\u002Fpath\u002Fto\u002Fpython\",\n    \"traceNativeMemory\": true\n}\n```\n\n## Exploring results (`pylancePythonProfileExplorer`)\n\nLoad the capture's metadata JSON, then query views with the returned `profileId`:\n\n```json\n{\"action\":\"loadCpuProfile\",\"filePath\":\"\u002Fpath\u002Fto\u002FartifactsDir\u002Fcpu.metadata.json\"}\n{\"action\":\"query\",\"profileId\":\"cpu-...\",\"view\":\"summary\"}\n{\"action\":\"query\",\"profileId\":\"cpu-...\",\"view\":\"bottomUp\"}\n{\"action\":\"query\",\"profileId\":\"cpu-...\",\"view\":\"search\",\"queryText\":\"compute\"}\n```\n\n-   CPU views: `summary | callTree | bottomUp | eventLog | search | nodeContext`.\n-   Trace views: `summary | events | byCategory | byProcessThread | timelineSlices | search`.\n-   Heap views: `summary | allocations | search`.\n-   For region captures, `loadCpuProfile` returns a `region` block (bounds + markers). Slice a CPU view to\n    the region or a sub-region with `startTimeMs`\u002F`endTimeMs` (both are ms from start).\n-   `search` `queryText` syntax: space-separated terms OR; `+term` AND; `\u002Fregex\u002F`; `\"phrase\"` exact.\n-   `\u002Fregex\u002F` format — a common, safe subset, always case-insensitive:\n    -   Supported: literals and escaped metacharacters; `.`; character classes `[...]`\u002F`[^...]`\u002Franges and `\\d \\D \\w \\W \\s \\S`; anchors `^` `$`; groups `( )` and `(?: )`; alternation `|`; quantifiers `* + ? {m} {m,} {m,n}` (a trailing lazy `?` is accepted); control escapes `\\n \\r \\t \\f \\v \\0`.\n    -   Not supported (the term degrades to a literal substring match): word boundaries `\\b` `\\B`, named groups, back-references, look-around `(?=) (?!) (?\u003C=) (?\u003C!)`, hex\u002FUnicode escapes `\\xHH`\u002F`\\uHHHH`, Unicode property escapes `\\p{...}`, and all flags (`i s m g u y`).\n-   Use `loadTrace` \u002F `loadHeapSnapshot` for the other backends.\n\n## Working Rules\n\n-   Always pass the `*.metadata.json` sidecar to the explorer loaders, never the raw `.bin`\u002F`.ndjson`.\n-   For CPU work, verify or select a 3.15+ interpreter first; surface the version error verbatim if it\n    fails rather than guessing.\n-   Prefer `startCpuRegion` over `startCpu` + `duration` when the user cares about a specific code range —\n    the handshake guarantees the sampler is live at region start instead of racing attach latency.\n-   Prefer markers over many tiny region captures when labeling several adjacent phases under one attach.\n-   Report the `profilingSessionId`, `artifactsDir`, and (for regions) the resolved start\u002Fstop\u002Fmarker\n    locations so the user can re-open the capture later.\n\n## Known limitations and quirks\n\nThese are current rough edges. Where the tool returns a structured error, surface it verbatim rather than\nguessing a fix.\n\n### Capture\n\n-   **Memray (memory) is unsupported on Windows.** `takeHeapSnapshot` returns a platform-aware error on\n    win32 — there is no package to install. Capture memory on Linux\u002FWSL or macOS instead.\n-   **`blocking:true` is unsupported on Windows.** It returns a structured error before any sampler starts;\n    re-run without `blocking:true`, or capture on Linux\u002FWSL.\n-   **Attach\u002Fregion on a Windows `uv venv` interpreter can fail to produce an artifact.** The uv venv\n    trampoline-shim `python.exe` re-execs the real interpreter as a child and then exits, so the launched\n    PID is gone before Tachyon can sample it. (A stdlib `python -m venv` does not have this problem — attach\n    works there.) Use launch mode, attach to the real `python.exe` child PID, or pass the base interpreter as\n    `pythonPath`. The tool surfaces this hint when an attach\u002Fregion capture on a uv venv yields no artifact.\n-   **`samplingMode:\"gil\"` is near-unusable under GIL contention** — it collects very few samples. For\n    GIL-bound workloads prefer `cpu` (or `wall`) and read thread behavior from the call tree.\n-   **`samplingRate` saturates around 400–500 Hz.** Requesting a higher rate does not raise the effective\n    sample frequency; treat ~500 Hz as the practical ceiling and do not infer precision beyond it.\n-   **Region markers force per-line `sys.monitoring` while the region is active**, which slows the target.\n    Keep markers out of tight hot loops, or accept the slowdown for the measured region only.\n-   **A marker on the exact region-start line folds into `t=0`.** Place markers on lines strictly inside the\n    region (after the start line) so their timestamps are distinct.\n\n### Exploring\n\n-   **Pass the `*.metadata.json` sidecar to the loaders, never a raw `.bin`.** Loading a raw capture binary\n    returns a friendly hint pointing at the metadata sidecar instead of an opaque parse error.\n-   **CPU views summarize a single thread.** `loadCpuProfile` reports the analyzed thread under\n    `threads.analyzed` (with its sample count); other threads are not aggregated into the same view. State\n    this limitation when reporting multi-threaded results.\n-   **`bottomUp` sorted by self can list zero-self bootstrap frames first.** When reading `bottomUp` by\n    self time, look past root\u002Fbootstrap frames with zero self to find the true hot leaves.\n-   **Trace event views scan all events and honor `startTimeMs`\u002F`endTimeMs`.** `events`, `search`,\n    `byCategory`, and `byProcessThread` page over the full event set and reconcile with `summary`; use the\n    time window to reach later events rather than expecting one page to cover the whole trace.\n","# Pylance Python Profiling\n\nUse this skill to drive the `pylancePythonProfiling` capture tool and the `pylancePythonProfileExplorer`\nanalysis tool. Capture produces artifacts on disk plus a sidecar metadata JSON; the explorer loads that\nmetadata and answers paged queries (hot functions, call tree, time-sliced views).\n\n## Tools\n\n-   `pylancePythonProfiling` — start\u002Fstop captures and inspect sessions. One `action` per call.\n-   `pylancePythonProfileExplorer` — load a capture's metadata JSON and query it.\n\nRun `{\"action\":\"help\"}` on either tool to print its full surface.\n\n## Verified Tool Facts\n\n-   Backends: CPU = `profiling.sampling` (Tachyon), Trace = `sys.monitoring`, Memory = Memray.\n-   **CPU profiling requires Python 3.15+.** The tool resolves the workspace-selected interpreter (same\n    resolution as the other Pylance MCP tools). If it is below 3.15, capture returns a structured error\n    naming the selected version. Fix by selecting a 3.15+ interpreter or passing `pythonPath` explicitly.\n-   Trace and Memory work on older interpreters (Trace needs 3.12+ for `sys.monitoring`).\n-   Every capture returns a `profilingSessionId` immediately and writes artifacts under an `artifactsDir`,\n    including a `*.metadata.json` sidecar. Pass that metadata path to the explorer, not the raw binary.\n-   Captures own their own session lifecycle; they do not require `pylancePythonDebug`.\n-   The injected handshake and sampler wrapper are code **we add on the fly** — the user's source is never\n    edited. Region boundaries and markers are expressed as `file:line`.\n\n## Actions (`pylancePythonProfiling`)\n\n| `action`           | Purpose                                                                |\n| ------------------ | ---------------------------------------------------------------------- |\n| `list`             | Show active\u002Fcompleted sessions.                                        |\n| `status`           | Inspect one session (`profilingSessionId`).                            |\n| `startCpu`         | CPU capture. `mode:\"launch\"` (script\u002Fmodule) or `mode:\"attach\"` (pid). |\n| `startCpuRegion`   | CPU capture of one region only (launch mode). See below.               |\n| `stopCpu`          | Stop\u002Ffinalize a CPU session; returns saved artifact paths.             |\n| `startTracing`     | `sys.monitoring` trace of a script\u002Fmodule (launch only).               |\n| `stopTracing`      | Cooperative stop for a trace session.                                  |\n| `takeHeapSnapshot` | One-shot Memray capture.                                               |\n| `stop`             | Terminate a session and drop it from the in-memory list.               |\n| `help`             | Print full help.                                                       |\n\nCPU sampling options (apply to `startCpu` and `startCpuRegion`): `samplingRate` (e.g. `\"1khz\"`),\n`duration` (seconds), `samplingMode` (`wall|cpu|gil|exception`, default `cpu`), `allThreads`, `native`,\n`noGc`, `opcodes`, `blocking`, `subprocesses`.\n\n## Scenario 1 — Profile a whole run\n\nLaunch a script under the CPU sampler, then load the result:\n\n```json\n{\n    \"action\": \"startCpu\",\n    \"mode\": \"launch\",\n    \"script\": \"\u002Fpath\u002Fto\u002Fapp.py\",\n    \"pythonPath\": \"\u002Fpath\u002Fto\u002Fpython\",\n    \"samplingRate\": \"1khz\"\n}\n```\n\nAttach to an already-running process instead:\n\n```json\n{ \"action\": \"startCpu\", \"mode\": \"attach\", \"pid\": 12345, \"pythonPath\": \"\u002Fpath\u002Fto\u002Fpython\" }\n```\n\nBound an attach by wall-clock time:\n\n```json\n{ \"action\": \"startCpu\", \"mode\": \"attach\", \"pid\": 12345, \"samplingMode\": \"wall\", \"duration\": 30 }\n```\n\nWhen done (launch captures finalize on their own; attach\u002Fduration captures too), retrieve artifacts:\n\n```json\n{ \"action\": \"stopCpu\", \"profilingSessionId\": \"pyprof-...\" }\n```\n\n## Scenario 2 — Profile a specific region (`startCpuRegion`)\n\nUse this when only part of a run matters (a hot function, a request handler) and you want the sampler live\nfrom the region's first instruction with no attach-latency contamination. Launch mode only.\n\n```json\n{\n    \"action\": \"startCpuRegion\",\n    \"mode\": \"launch\",\n    \"script\": \"\u002Fpath\u002Fto\u002Fapp.py\",\n    \"pythonPath\": \"\u002Fpath\u002Fto\u002Fpython\",\n    \"regionStartLocation\": \"app.py:42\",\n    \"regionStopLocation\": \"app.py:88\"\n}\n```\n\nHow it works (no user code edits):\n\n1. The target launches under an injected handshake. When execution first reaches `regionStartLocation`\n   the target parks.\n2. Tachyon attaches to the parked target, then the target is released — so the region is sampled from its\n   first instruction. Attach cost is paid while parked, outside the measured region.\n3. When execution reaches `regionStopLocation`, the sampler is detached and its data flushed before the\n   target resumes its tail.\n\nRegion bounds are recorded in metadata as `region.startTimeMs`\u002F`region.endTimeMs`, so the explorer can\nslice CPU views exactly to the region with `startTimeMs`\u002F`endTimeMs`.\n\nGuidance:\n\n-   Locations are `file:line`; relative paths resolve against the target's working directory.\n-   The start line must actually execute, or the region never starts (the tool reports the target exited\n    before reaching the start location).\n-   Use `stopCpu` to fetch artifacts or to stop early.\n\n## Scenario 3 — Sub-region markers\n\nMarkers label points **inside** the region without parking or re-attaching. Use them to break one attach\ninto several labeled sub-regions (cheaper than many tiny `startCpuRegion` calls) and to annotate phases.\n\nPass `regionMarkers` as `\"label@file:line\"` (or just `\"file:line\"`):\n\n```json\n{\n    \"action\": \"startCpuRegion\",\n    \"mode\": \"launch\",\n    \"script\": \"\u002Fpath\u002Fto\u002Fapp.py\",\n    \"pythonPath\": \"\u002Fpath\u002Fto\u002Fpython\",\n    \"regionStartLocation\": \"app.py:42\",\n    \"regionStopLocation\": \"app.py:88\",\n    \"regionMarkers\": [\"load@app.py:50\", \"compute@app.py:64\", \"render@app.py:80\"]\n}\n```\n\nEach time execution reaches a marker line inside the region, a labeled timestamp (ms from region start) is\nrecorded. The explorer surfaces them under `region.markers`; use adjacent marker times as\n`startTimeMs`\u002F`endTimeMs` to slice a sub-region.\n\n## Scenario 4 — Trace and memory\n\n```json\n{\"action\":\"startTracing\",\"mode\":\"launch\",\"module\":\"mypackage.app\",\"pythonPath\":\"\u002Fpath\u002Fto\u002Fpython\"}\n{\"action\":\"stopTracing\",\"profilingSessionId\":\"pyprof-...\"}\n```\n\n```json\n{\n    \"action\": \"takeHeapSnapshot\",\n    \"mode\": \"launch\",\n    \"script\": \"\u002Fpath\u002Fto\u002Fapp.py\",\n    \"pythonPath\": \"\u002Fpath\u002Fto\u002Fpython\",\n    \"traceNativeMemory\": true\n}\n```\n\n## Exploring results (`pylancePythonProfileExplorer`)\n\nLoad the capture's metadata JSON, then query views with the returned `profileId`:\n\n```json\n{\"action\":\"loadCpuProfile\",\"filePath\":\"\u002Fpath\u002Fto\u002FartifactsDir\u002Fcpu.metadata.json\"}\n{\"action\":\"query\",\"profileId\":\"cpu-...\",\"view\":\"summary\"}\n{\"action\":\"query\",\"profileId\":\"cpu-...\",\"view\":\"bottomUp\"}\n{\"action\":\"query\",\"profileId\":\"cpu-...\",\"view\":\"search\",\"queryText\":\"compute\"}\n```\n\n-   CPU views: `summary | callTree | bottomUp | eventLog | search | nodeContext`.\n-   Trace views: `summary | events | byCategory | byProcessThread | timelineSlices | search`.\n-   Heap views: `summary | allocations | search`.\n-   For region captures, `loadCpuProfile` returns a `region` block (bounds + markers). Slice a CPU view to\n    the region or a sub-region with `startTimeMs`\u002F`endTimeMs` (both are ms from start).\n-   `search` `queryText` syntax: space-separated terms OR; `+term` AND; `\u002Fregex\u002F`; `\"phrase\"` exact.\n-   `\u002Fregex\u002F` format — a common, safe subset, always case-insensitive:\n    -   Supported: literals and escaped metacharacters; `.`; character classes `[...]`\u002F`[^...]`\u002Franges and `\\d \\D \\w \\W \\s \\S`; anchors `^` `$`; groups `( )` and `(?: )`; alternation `|`; quantifiers `* + ? {m} {m,} {m,n}` (a trailing lazy `?` is accepted); control escapes `\\n \\r \\t \\f \\v \\0`.\n    -   Not supported (the term degrades to a literal substring match): word boundaries `\\b` `\\B`, named groups, back-references, look-around `(?=) (?!) (?\u003C=) (?\u003C!)`, hex\u002FUnicode escapes `\\xHH`\u002F`\\uHHHH`, Unicode property escapes `\\p{...}`, and all flags (`i s m g u y`).\n-   Use `loadTrace` \u002F `loadHeapSnapshot` for the other backends.\n\n## Working Rules\n\n-   Always pass the `*.metadata.json` sidecar to the explorer loaders, never the raw `.bin`\u002F`.ndjson`.\n-   For CPU work, verify or select a 3.15+ interpreter first; surface the version error verbatim if it\n    fails rather than guessing.\n-   Prefer `startCpuRegion` over `startCpu` + `duration` when the user cares about a specific code range —\n    the handshake guarantees the sampler is live at region start instead of racing attach latency.\n-   Prefer markers over many tiny region captures when labeling several adjacent phases under one attach.\n-   Report the `profilingSessionId`, `artifactsDir`, and (for regions) the resolved start\u002Fstop\u002Fmarker\n    locations so the user can re-open the capture later.\n\n## Known limitations and quirks\n\nThese are current rough edges. Where the tool returns a structured error, surface it verbatim rather than\nguessing a fix.\n\n### Capture\n\n-   **Memray (memory) is unsupported on Windows.** `takeHeapSnapshot` returns a platform-aware error on\n    win32 — there is no package to install. Capture memory on Linux\u002FWSL or macOS instead.\n-   **`blocking:true` is unsupported on Windows.** It returns a structured error before any sampler starts;\n    re-run without `blocking:true`, or capture on Linux\u002FWSL.\n-   **Attach\u002Fregion on a Windows `uv venv` interpreter can fail to produce an artifact.** The uv venv\n    trampoline-shim `python.exe` re-execs the real interpreter as a child and then exits, so the launched\n    PID is gone before Tachyon can sample it. (A stdlib `python -m venv` does not have this problem — attach\n    works there.) Use launch mode, attach to the real `python.exe` child PID, or pass the base interpreter as\n    `pythonPath`. The tool surfaces this hint when an attach\u002Fregion capture on a uv venv yields no artifact.\n-   **`samplingMode:\"gil\"` is near-unusable under GIL contention** — it collects very few samples. For\n    GIL-bound workloads prefer `cpu` (or `wall`) and read thread behavior from the call tree.\n-   **`samplingRate` saturates around 400–500 Hz.** Requesting a higher rate does not raise the effective\n    sample frequency; treat ~500 Hz as the practical ceiling and do not infer precision beyond it.\n-   **Region markers force per-line `sys.monitoring` while the region is active**, which slows the target.\n    Keep markers out of tight hot loops, or accept the slowdown for the measured region only.\n-   **A marker on the exact region-start line folds into `t=0`.** Place markers on lines strictly inside the\n    region (after the start line) so their timestamps are distinct.\n\n### Exploring\n\n-   **Pass the `*.metadata.json` sidecar to the loaders, never a raw `.bin`.** Loading a raw capture binary\n    returns a friendly hint pointing at the metadata sidecar instead of an opaque parse error.\n-   **CPU views summarize a single thread.** `loadCpuProfile` reports the analyzed thread under\n    `threads.analyzed` (with its sample count); other threads are not aggregated into the same view. State\n    this limitation when reporting multi-threaded results.\n-   **`bottomUp` sorted by self can list zero-self bootstrap frames first.** When reading `bottomUp` by\n    self time, look past root\u002Fbootstrap frames with zero self to find the true hot leaves.\n-   **Trace event views scan all events and honor `startTimeMs`\u002F`endTimeMs`.** `events`, `search`,\n    `byCategory`, and `byProcessThread` page over the full event set and reconcile with `summary`; use the\n    time window to reach later events rather than expecting one page to cover the whole trace.\n",{"name":5,"description":7},"main","900ea3c9eb045fd5b0317dc1103777ecf3ea4aeb","skills\u002Fpylance-python-profiling",0,"https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker","https:\u002F\u002Fnguyenhungtran18.github.io\u002Fskill-and-tool-tracker\u002F","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18","2026-08-31 18:36:09",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add nguyenhungtran18\u002Fskill-and-tool-tracker --skill pylance-python-profiling",{"tool":37,"command":38},"bunx","bunx skills add nguyenhungtran18\u002Fskill-and-tool-tracker --skill pylance-python-profiling",{"tool":40,"command":41},"pnpm","pnpm dlx skills add nguyenhungtran18\u002Fskill-and-tool-tracker --skill pylance-python-profiling","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fpylance-python-profiling\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"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},"01M7BVP4P83TK60JZ4P8RP9VP7","xcode-project-setup","Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fxcode_project_setup\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},"01M7BVP01K4CSJJ8G90FT8S2D5","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-skills\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},"01M7BVNY22GXD871GYTSH599F1","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-plans\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},"01M7BVNQWF24RNKA8A4KM2HJ3T","workflow-skill-creator","Distills a completed user workflow or interaction into a reusable agent skill. Use when the user asks to turn their workflow, interaction, or multi-step process into a skill, or when they say \"make this a skill\", \"create a skill from what we just did\", \"package this workflow\" or similar. Do not use for creating skills from scratch without an existing workflow (use a generic skill-creator for that).","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow_skill_creator\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},"01M7BVNNY67XPCQAQHY3FBKDGC","verify-and-stop","Prove existing work meets acceptance conditions without expanding scope. Use for validation-only tasks, completion checks, focused gate runs, and last-mile proof.","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fverify-and-stop\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},"01M7BVNKB4Z7SZT85B73ZZ90Y6","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[]]