[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ACYJM1XYHYXN4MKB975WX9":3,"skill-same:01M6ACYJM1XYHYXN4MKB975WX9":93},{"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":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":53,"ownerHtmlUrl":54,"ownerBlogUrl":55,"ownerDescription":6,"updatedAt":56,"install":57,"resources":70},"01M6ACYJM1XYHYXN4MKB975WX9","fory-performance-optimization",null,"Run profile-driven bottleneck optimization across Apache Fory implementations (Java, C++, Python\u002FCython, Go, Rust, Swift, C#, JavaScript\u002FTypeScript, Dart, Kotlin, Scala). Use when improving serialize\u002Fdeserialize throughput or latency, recovering regressions against a reference commit, diagnosing flamegraphs, fixing perf-related CI failures, or porting proven optimizations across languages without protocol or API regressions.","apache\u002Ffory","apache","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47359?v=4","01M6AC83E6K4FDKK7HZ8WNMQKE","The Apache Software Foundation","01M6ACYG841PGN6KSQGHBNJTNF",4582,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fapache\u002Ffory\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffory-performance-optimization\u002FSKILL.md",[],[19,20,21,22,23,9,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"performance","performance optimization","Optimization","fory","fory performance optimization","when","porting","throughput","across","bottleneck","api","ci","java","swift","protocol","run","perf","scala","commit","javascript","rust","python","go","typescript","2026-11-10 10:12:30",false,"---\nname: fory-performance-optimization\ndescription: Run profile-driven bottleneck optimization across Apache Fory implementations (Java, C++, Python\u002FCython, Go, Rust, Swift, C#, JavaScript\u002FTypeScript, Dart, Kotlin, Scala). Use when improving serialize\u002Fdeserialize throughput or latency, recovering regressions against a reference commit, diagnosing flamegraphs, fixing perf-related CI failures, or porting proven optimizations across languages without protocol or API regressions.\n---\n\n# Fory Performance Optimization\n\n## Mission\n\nDeliver measurable performance improvements in Apache Fory without protocol drift, correctness regressions, benchmark-shape tricks, or accidental API rollback.\n\n## Operating Principles\n\n- Start from data, not intuition.\n- Profile before changing hot code.\n- Change one bottleneck at a time.\n- Benchmark sequentially on the same machine state (one benchmark process at a time).\n- Compare old\u002Fnew benchmark results case-by-case in adjacent pairs: run one case on `apache\u002Fmain`,\n  then immediately run that same case on the current branch before moving to the next case.\n- Under high or variable host load, run multiple short adjacent baseline\u002Fcurrent pairs. Keep each\n  process short and alternate sides instead of lengthening one run or batching all baseline runs.\n- Keep only measured wins or explicitly requested architecture cleanups.\n- Revert speculative changes that do not pay off.\n- During each optimization round, benchmark only cases directly affected by the change. Defer\n  unrelated controls, full-suite sanity benchmarks, and full comparison matrices to final\n  verification of the whole optimization task unless the user explicitly requests them earlier.\n- Align with reference runtimes (usually C++ first, then Rust\u002FJava) when behavior and ownership models differ.\n\n## Enforce Hard Constraints\n\n- Preserve wire protocol unless explicitly requested.\n- Preserve cross-language semantics and xlang compatibility.\n- Never run two benchmarks at the same time on one host; run exactly one benchmark command at a time.\n- Do not optimize by changing benchmark payload definitions, field encodings, or benchmark methodology.\n- Do not add payload-identity or repeated-input caches that depend on benchmark shape.\n- Do not restore removed APIs\u002Flegacy wrappers when the user forbids it.\n- Do not preserve legacy\u002Fdead code or stale docs in optimization rounds; remove them when touched.\n- Keep API surface minimal: do not add new API unless required by protocol\u002Fcorrectness or explicitly requested.\n- Never add public hacky API for performance shortcuts; keep optimization helpers internal\u002Fprivate and conceptually clean.\n- Do not hide regressions behind unsafe compiler flags or benchmark-only code paths.\n- Keep optimization surfaces nested-safe; avoid root-only shortcuts unless they are architecturally valid and requested.\n- Do not add reader-side validation solely to produce an earlier or more precise malformed-input\n  error. A necessary crash, panic, undefined-behavior, out-of-bounds, resource-amplification,\n  no-progress, state-pollution, type, or policy guard must keep its hot success path to a primitive\n  branch and move exception allocation and message formatting into a cold no-inline helper when\n  supported. If an existing bounds-safe downstream operation already raises a controlled root\n  error, do not duplicate its validation on the hot path.\n\n## Execute Workflow\n\n1. Read context and constraints.\n\n- Read `tasks\u002Fperf_optimization_rounds.md` and `tasks\u002Flessons.md`.\n- Read the relevant spec in `docs\u002Fspecification\u002F` for any path that may affect wire behavior.\n- Record explicit user constraints (forbidden APIs, naming, architecture, protocol rules).\n\n2. Define target and baseline.\n\n- Identify one primary KPI (for example `Struct Serialize ns\u002Fop` or ops\u002Fsec).\n- Benchmark current `HEAD`.\n- If a reference commit is provided, persist its built benchmark artifact and commit identity. Treat\n  stored numbers as historical context, not a substitute for an adjacent baseline run in each\n  comparison pair.\n\n3. Profile the hotspot.\n\n- Capture a flamegraph or sampled stacks on the exact benchmark command.\n- Quantify top costs by bucket (runtime bookkeeping, dispatch, allocation\u002Fcopy, map\u002Fcache operations, buffer growth, metadata parse\u002Fvalidation).\n- Tie each bucket to concrete file\u002Fline ownership before proposing changes.\n\n4. Form one round hypothesis.\n\n- State one bottleneck and one expected effect.\n- Prefer structural fixes over micro-tweaks.\n- If another runtime already solved the same bottleneck, port its design shape first.\n\n5. Implement minimal change.\n\n- Touch the smallest surface that can validate the hypothesis.\n- Keep invariants explicit: protocol bytes, ownership, cache lifetime, reference semantics, nullability, schema-compatible behavior.\n\n6. Verify correctness.\n\n- Run language-local build\u002Ftest\u002Flint for the touched implementation.\n- Run cross-language checks when runtime\u002Ftype\u002Fprotocol behavior can affect xlang.\n- Confirm serialized sizes and compatibility expectations where applicable.\n- For Java performance work, defer local GraalVM image builds and executions to the final\n  verification of the whole optimization task. Do not repeat them in individual rounds unless\n  the user explicitly requests an earlier run.\n\n7. Benchmark and compare.\n\n- Run targeted benchmark at least twice sequentially.\n- Pair each baseline case with the matching current-branch case before starting another case, so\n  both measurements see closer machine load conditions.\n- When host load is high or pair results conflict, use several short baseline\u002Fcurrent pairs with the\n  same warmup and measurement settings. Run `baseline, current, baseline, current` as separate\n  processes; never run all baseline samples before all current samples.\n- Record every pair while it runs. Exclude a pair only with objective contamination evidence such as\n  a competing process, load spike, interruption, or throughput collapse; record the exclusion and\n  do not cherry-pick by direction.\n- Compare paired deltas using their median and dispersion. Do not optimize from a single pair,\n  non-adjacent samples, or a contaminated result. If the retained pairs do not establish a stable\n  signal, stop and wait for a cleaner window instead of changing code against the apparent result.\n- At final verification of the whole optimization task, run the deferred full-suite sanity\n  benchmark and matched comparison matrix to check collateral regressions. Do not repeat these\n  benchmarks in individual optimization rounds.\n\n8. Decide keep or revert.\n\n- Keep only if gain is repeatable or cleanup is explicitly requested and accepted with measured tradeoff.\n- Revert if performance regresses or gain is within noise and complexity increases.\n- If a required cleanup regresses, redesign inside the new architecture instead of restoring banned patterns.\n\n9. Log every round.\n\n- Append one round entry to `tasks\u002Fperf_optimization_rounds.md` before starting the next round.\n- Include hypothesis, code change, exact commands, before\u002Fafter numbers, and keep\u002Frevert decision.\n- Commit retained non-trivial rounds immediately.\n\n10. Re-plan on instability.\n\n- Stop and re-plan when benchmark runs conflict, machine contention is suspected, or profile does not match hypothesis.\n- On a busy machine, re-plan the measurement schedule to multiple short adjacent pairs before\n  forming an optimization hypothesis from benchmark deltas.\n- Re-ground on current `HEAD` after reset\u002Frebase\u002Fcheckout events before making further changes.\n\n## Apply Decision Rules\n\n- Treat \u003C1-2% movement as noise unless repeated under controlled runs.\n- Require explicit proof for complexity-increasing optimizations.\n- Prefer deleting dead APIs and dead state quickly after refactors.\n- Keep naming\u002FAPI cleanup only if performance remains in band.\n- Never run before\u002Fafter comparisons in parallel.\n\n## Use References\n\n- Use [`references\u002Fworkflow-checklist.md`](references\u002Fworkflow-checklist.md) for execution checklists and stop conditions.\n- Use [`references\u002Flanguage-command-matrix.md`](references\u002Flanguage-command-matrix.md) for the quick per-language verification matrix, and the canonical runtime docs under `..\u002F..\u002Flanguages\u002F*.md` for full language-specific rules.\n- Use [`references\u002Fbottleneck-playbook.md`](references\u002Fbottleneck-playbook.md) for hotspot-to-fix mapping.\n- Use [`references\u002Fround-template.md`](references\u002Fround-template.md) to log each optimization round consistently.\n\n## Produce Output\n\nWhen finishing an optimization task, report:\n\n- Baseline command and numbers.\n- Final command and numbers.\n- Net delta on primary KPI.\n- Correctness and compatibility verification run.\n- Kept vs reverted rounds and rationale.\n","# Fory Performance Optimization\n\n## Mission\n\nDeliver measurable performance improvements in Apache Fory without protocol drift, correctness regressions, benchmark-shape tricks, or accidental API rollback.\n\n## Operating Principles\n\n- Start from data, not intuition.\n- Profile before changing hot code.\n- Change one bottleneck at a time.\n- Benchmark sequentially on the same machine state (one benchmark process at a time).\n- Compare old\u002Fnew benchmark results case-by-case in adjacent pairs: run one case on `apache\u002Fmain`,\n  then immediately run that same case on the current branch before moving to the next case.\n- Under high or variable host load, run multiple short adjacent baseline\u002Fcurrent pairs. Keep each\n  process short and alternate sides instead of lengthening one run or batching all baseline runs.\n- Keep only measured wins or explicitly requested architecture cleanups.\n- Revert speculative changes that do not pay off.\n- During each optimization round, benchmark only cases directly affected by the change. Defer\n  unrelated controls, full-suite sanity benchmarks, and full comparison matrices to final\n  verification of the whole optimization task unless the user explicitly requests them earlier.\n- Align with reference runtimes (usually C++ first, then Rust\u002FJava) when behavior and ownership models differ.\n\n## Enforce Hard Constraints\n\n- Preserve wire protocol unless explicitly requested.\n- Preserve cross-language semantics and xlang compatibility.\n- Never run two benchmarks at the same time on one host; run exactly one benchmark command at a time.\n- Do not optimize by changing benchmark payload definitions, field encodings, or benchmark methodology.\n- Do not add payload-identity or repeated-input caches that depend on benchmark shape.\n- Do not restore removed APIs\u002Flegacy wrappers when the user forbids it.\n- Do not preserve legacy\u002Fdead code or stale docs in optimization rounds; remove them when touched.\n- Keep API surface minimal: do not add new API unless required by protocol\u002Fcorrectness or explicitly requested.\n- Never add public hacky API for performance shortcuts; keep optimization helpers internal\u002Fprivate and conceptually clean.\n- Do not hide regressions behind unsafe compiler flags or benchmark-only code paths.\n- Keep optimization surfaces nested-safe; avoid root-only shortcuts unless they are architecturally valid and requested.\n- Do not add reader-side validation solely to produce an earlier or more precise malformed-input\n  error. A necessary crash, panic, undefined-behavior, out-of-bounds, resource-amplification,\n  no-progress, state-pollution, type, or policy guard must keep its hot success path to a primitive\n  branch and move exception allocation and message formatting into a cold no-inline helper when\n  supported. If an existing bounds-safe downstream operation already raises a controlled root\n  error, do not duplicate its validation on the hot path.\n\n## Execute Workflow\n\n1. Read context and constraints.\n\n- Read `tasks\u002Fperf_optimization_rounds.md` and `tasks\u002Flessons.md`.\n- Read the relevant spec in `docs\u002Fspecification\u002F` for any path that may affect wire behavior.\n- Record explicit user constraints (forbidden APIs, naming, architecture, protocol rules).\n\n2. Define target and baseline.\n\n- Identify one primary KPI (for example `Struct Serialize ns\u002Fop` or ops\u002Fsec).\n- Benchmark current `HEAD`.\n- If a reference commit is provided, persist its built benchmark artifact and commit identity. Treat\n  stored numbers as historical context, not a substitute for an adjacent baseline run in each\n  comparison pair.\n\n3. Profile the hotspot.\n\n- Capture a flamegraph or sampled stacks on the exact benchmark command.\n- Quantify top costs by bucket (runtime bookkeeping, dispatch, allocation\u002Fcopy, map\u002Fcache operations, buffer growth, metadata parse\u002Fvalidation).\n- Tie each bucket to concrete file\u002Fline ownership before proposing changes.\n\n4. Form one round hypothesis.\n\n- State one bottleneck and one expected effect.\n- Prefer structural fixes over micro-tweaks.\n- If another runtime already solved the same bottleneck, port its design shape first.\n\n5. Implement minimal change.\n\n- Touch the smallest surface that can validate the hypothesis.\n- Keep invariants explicit: protocol bytes, ownership, cache lifetime, reference semantics, nullability, schema-compatible behavior.\n\n6. Verify correctness.\n\n- Run language-local build\u002Ftest\u002Flint for the touched implementation.\n- Run cross-language checks when runtime\u002Ftype\u002Fprotocol behavior can affect xlang.\n- Confirm serialized sizes and compatibility expectations where applicable.\n- For Java performance work, defer local GraalVM image builds and executions to the final\n  verification of the whole optimization task. Do not repeat them in individual rounds unless\n  the user explicitly requests an earlier run.\n\n7. Benchmark and compare.\n\n- Run targeted benchmark at least twice sequentially.\n- Pair each baseline case with the matching current-branch case before starting another case, so\n  both measurements see closer machine load conditions.\n- When host load is high or pair results conflict, use several short baseline\u002Fcurrent pairs with the\n  same warmup and measurement settings. Run `baseline, current, baseline, current` as separate\n  processes; never run all baseline samples before all current samples.\n- Record every pair while it runs. Exclude a pair only with objective contamination evidence such as\n  a competing process, load spike, interruption, or throughput collapse; record the exclusion and\n  do not cherry-pick by direction.\n- Compare paired deltas using their median and dispersion. Do not optimize from a single pair,\n  non-adjacent samples, or a contaminated result. If the retained pairs do not establish a stable\n  signal, stop and wait for a cleaner window instead of changing code against the apparent result.\n- At final verification of the whole optimization task, run the deferred full-suite sanity\n  benchmark and matched comparison matrix to check collateral regressions. Do not repeat these\n  benchmarks in individual optimization rounds.\n\n8. Decide keep or revert.\n\n- Keep only if gain is repeatable or cleanup is explicitly requested and accepted with measured tradeoff.\n- Revert if performance regresses or gain is within noise and complexity increases.\n- If a required cleanup regresses, redesign inside the new architecture instead of restoring banned patterns.\n\n9. Log every round.\n\n- Append one round entry to `tasks\u002Fperf_optimization_rounds.md` before starting the next round.\n- Include hypothesis, code change, exact commands, before\u002Fafter numbers, and keep\u002Frevert decision.\n- Commit retained non-trivial rounds immediately.\n\n10. Re-plan on instability.\n\n- Stop and re-plan when benchmark runs conflict, machine contention is suspected, or profile does not match hypothesis.\n- On a busy machine, re-plan the measurement schedule to multiple short adjacent pairs before\n  forming an optimization hypothesis from benchmark deltas.\n- Re-ground on current `HEAD` after reset\u002Frebase\u002Fcheckout events before making further changes.\n\n## Apply Decision Rules\n\n- Treat \u003C1-2% movement as noise unless repeated under controlled runs.\n- Require explicit proof for complexity-increasing optimizations.\n- Prefer deleting dead APIs and dead state quickly after refactors.\n- Keep naming\u002FAPI cleanup only if performance remains in band.\n- Never run before\u002Fafter comparisons in parallel.\n\n## Use References\n\n- Use [`references\u002Fworkflow-checklist.md`](references\u002Fworkflow-checklist.md) for execution checklists and stop conditions.\n- Use [`references\u002Flanguage-command-matrix.md`](references\u002Flanguage-command-matrix.md) for the quick per-language verification matrix, and the canonical runtime docs under `..\u002F..\u002Flanguages\u002F*.md` for full language-specific rules.\n- Use [`references\u002Fbottleneck-playbook.md`](references\u002Fbottleneck-playbook.md) for hotspot-to-fix mapping.\n- Use [`references\u002Fround-template.md`](references\u002Fround-template.md) to log each optimization round consistently.\n\n## Produce Output\n\nWhen finishing an optimization task, report:\n\n- Baseline command and numbers.\n- Final command and numbers.\n- Net delta on primary KPI.\n- Correctness and compatibility verification run.\n- Kept vs reverted rounds and rationale.\n",{"name":5,"description":7},"main","27476bbb172cad03a41982886fb66223e9203e12",".agents\u002Fskills\u002Ffory-performance-optimization",471,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ffory","https:\u002F\u002Ffory.apache.org","https:\u002F\u002Fgithub.com\u002Fapache","https:\u002F\u002Fwww.apache.org\u002F","2026-11-14 09:50:03",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add apache\u002Ffory --skill fory-performance-optimization",{"tool":63,"command":64},"bunx","bunx skills add apache\u002Ffory --skill fory-performance-optimization",{"tool":66,"command":67},"pnpm","pnpm dlx skills add apache\u002Ffory --skill fory-performance-optimization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapache\u002Ffory\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffory-performance-optimization\u002FSKILL.md",true,[71,77,81,85,89],{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"agents\u002Fopenai.yaml","REFERENCE","参考文档",1068,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ffory\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffory-performance-optimization\u002Fagents\u002Fopenai.yaml",{"path":78,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fbottleneck-playbook.md",3792,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ffory\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffory-performance-optimization\u002Freferences\u002Fbottleneck-playbook.md",{"path":82,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Flanguage-command-matrix.md",3127,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ffory\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffory-performance-optimization\u002Freferences\u002Flanguage-command-matrix.md",{"path":86,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fround-template.md",1412,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ffory\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffory-performance-optimization\u002Freferences\u002Fround-template.md",{"path":90,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fworkflow-checklist.md",3586,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ffory\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffory-performance-optimization\u002Freferences\u002Fworkflow-checklist.md",[94,117],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":43},"01M6ACYT2JX3ZBRH1KP0X4H1BC","fory-version-bump","Bump Apache Fory release or post-release development versions across Java, Kotlin, Scala, Python, Rust, Go, C++, C#, Dart, JavaScript, Swift, integration tests, examples, and source docs. Use when preparing a release version, moving main to the next development version, switching install docs to a released version, or auditing Fory version consistency after release scripts run.","https:\u002F\u002Fgithub.com\u002Fapache\u002Ffory\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffory-version-bump\u002FSKILL.md",[],[101,102,22,103,104,105,36,106,38,9,34,107,108,109,41,110,32,111,112,48,113,24,27,31,114,115,116,39,40],"fory version bump","bump","version","version bump","docs","examples","source","integration","release","next","install","scripts","switching","fory release","integration tests","development",{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":43},"01M6ACYQ2B1Z1DCE9DSS064R8V","fory-release","Stage or verify an Apache Fory release candidate and prepare GitHub release notes. Use GitHub Actions by default for ATR source staging and Nexus JVM staging; use the retained local manual workflow only when the user explicitly requests manual publishing.","https:\u002F\u002Fgithub.com\u002Fapache\u002Ffory\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffory-release\u002FSKILL.md",[],[109,22,114,124,9,125,126,127,128,129,130,131,24,132,133,107,134,135,136,137],"jvm","workflow","actions","default","local","github actions","only","release notes","candidate","notes","github release","for","manual","publishing"]