Skip to content

notque/vexjoy-agent / skills/programming/programming

programming

Flagged

Language rules, workflows, and tooling: Go, Python, Rust, Kotlin, Swift, PHP, TypeScript type checks and debugging, OpenStack Python, MCP local-docs servers, Node.js backend APIs.

FileKindSize
SKILL.mdskill md19.3 KB
references/go/code-review.mdmarkdown12.0 KB
references/go/code-review/common-review-comments.mdmarkdown6.6 KB
references/go/concurrency.mdmarkdown11.5 KB
references/go/concurrency/concurrency-patterns.mdmarkdown5.7 KB
references/go/error-handling.mdmarkdown10.8 KB
references/go/error-handling/patterns.mdmarkdown4.2 KB
references/go/google-style-guide/SHA256SUMSother313 B
references/go/google-style-guide/UPSTREAM_REVISIONother41 B
references/go/google-style-guide/best-practices/part-01.mdmarkdown10.0 KB
references/go/google-style-guide/best-practices/part-02.mdmarkdown15.0 KB
references/go/google-style-guide/best-practices/part-03.mdmarkdown14.1 KB
references/go/google-style-guide/best-practices/part-04.mdmarkdown13.5 KB
references/go/google-style-guide/best-practices/part-05.mdmarkdown10.5 KB
references/go/google-style-guide/best-practices/part-06.mdmarkdown14.4 KB
references/go/google-style-guide/best-practices/part-07.mdmarkdown16.1 KB
references/go/google-style-guide/best-practices/part-08.mdmarkdown11.4 KB
references/go/google-style-guide/best-practices/part-09.mdmarkdown13.7 KB
references/go/google-style-guide/best-practices/part-10.mdmarkdown16.9 KB
references/go/google-style-guide/decisions/part-01.mdmarkdown15.0 KB
references/go/google-style-guide/decisions/part-02.mdmarkdown12.5 KB
references/go/google-style-guide/decisions/part-03.mdmarkdown11.5 KB
references/go/google-style-guide/decisions/part-04.mdmarkdown8.4 KB
references/go/google-style-guide/decisions/part-05.mdmarkdown9.8 KB
references/go/google-style-guide/decisions/part-06.mdmarkdown14.7 KB
references/go/google-style-guide/decisions/part-07.mdmarkdown13.3 KB
references/go/google-style-guide/decisions/part-08.mdmarkdown14.3 KB
references/go/google-style-guide/decisions/part-09.mdmarkdown15.3 KB
references/go/google-style-guide/decisions/part-10.mdmarkdown8.3 KB
references/go/google-style-guide/guide/part-01.mdmarkdown16.3 KB
references/go/google-style-guide/guide/part-02.mdmarkdown3.0 KB
references/go/google-style-guide/index.mdmarkdown8.4 KB
references/go/preferred-patterns.mdmarkdown12.5 KB
references/go/preferred-patterns/code-examples.mdmarkdown11.6 KB
references/go/quality-gate.mdmarkdown7.3 KB
references/go/quality-gate/common-lint-errors.jsonconfig7.6 KB
references/go/quality-gate/examples.mdmarkdown11.0 KB
references/go/quality-gate/makefile-targets.jsonconfig5.1 KB
references/go/sapcc-conventions.mdmarkdown34.6 KB
references/go/sapcc-conventions/api-design-detailed.mdmarkdown22.7 KB
references/go/sapcc-conventions/architecture-patterns.mdmarkdown18.6 KB
references/go/sapcc-conventions/build-ci-detailed.mdmarkdown18.7 KB
references/go/sapcc-conventions/error-handling-detailed.mdmarkdown20.1 KB
references/go/sapcc-conventions/extended-patterns.mdmarkdown7.1 KB
references/go/sapcc-conventions/go-bits-philosophy-detailed.mdmarkdown24.5 KB
references/go/sapcc-conventions/library-reference.mdmarkdown14.0 KB
references/go/sapcc-conventions/pr-mining-insights.mdmarkdown17.5 KB
references/go/sapcc-conventions/review-standards.mdmarkdown10.5 KB
references/go/sapcc-conventions/sapcc-code-patterns.mdmarkdown46.2 KB
references/go/testing.mdmarkdown9.7 KB
references/go/testing/go-benchmark-and-concurrency.mdmarkdown5.6 KB
references/go/testing/go-test-patterns.mdmarkdown9.0 KB
references/golang-general.mdmarkdown8.9 KB
references/golang-general/go-modern-code.mdmarkdown17.2 KB
references/golang-general/go-verification-workflow.mdmarkdown5.0 KB
references/golang-general/go-version-idioms.mdmarkdown6.8 KB
references/kotlin-general.mdmarkdown7.5 KB
references/kotlin-general/kotlin-patterns.mdmarkdown7.9 KB
references/kotlin-general/kotlin-security-testing.mdmarkdown4.4 KB
references/kotlin-general/kotlin-security.mdmarkdown11.1 KB
references/kotlin/concurrency-patterns.mdmarkdown5.4 KB
references/kotlin/kotlin-testing.mdmarkdown7.9 KB
references/mcp-local-docs.mdmarkdown6.9 KB
references/mcp-local-docs/mcp-patterns.mdmarkdown9.6 KB
references/mcp-local-docs/mcp-preferred-patterns.mdmarkdown6.9 KB
references/mcp-local-docs/server-templates.mdmarkdown4.4 KB
references/mcp-local-docs/typescript-async-patterns.mdmarkdown8.9 KB
references/nodejs-api.mdmarkdown7.3 KB
references/nodejs-api/auth-patterns.mdmarkdown10.0 KB
references/nodejs-api/middleware-patterns.mdmarkdown10.5 KB
references/nodejs-api/nodejs-security.mdmarkdown12.3 KB
references/nodejs-api/webhook-patterns.mdmarkdown9.9 KB
references/php-general.mdmarkdown4.7 KB
references/php-general/php-behaviors.mdmarkdown5.2 KB
references/php-general/php-conventions.mdmarkdown5.8 KB
references/php/modern-php-features.mdmarkdown4.4 KB
references/php/testing-patterns.mdmarkdown7.5 KB
references/python-general.mdmarkdown7.7 KB
references/python-general/flask-jinja-webapp.mdmarkdown5.7 KB
references/python-general/python-local-gates.mdmarkdown4.4 KB
references/python-general/python-modern-code.mdmarkdown23.1 KB
references/python-openstack.mdmarkdown5.2 KB
references/python-openstack/error-handling.mdmarkdown658 B
references/python-openstack/hacking-rules.mdmarkdown4.1 KB
references/python-openstack/openstack-patterns.mdmarkdown1.2 KB
references/python-openstack/oslo-patterns.mdmarkdown6.4 KB
references/python-openstack/output-format.mdmarkdown2.4 KB
references/python-openstack/preferred-patterns.mdmarkdown1.9 KB
references/python-openstack/rpc-versioning.mdmarkdown5.3 KB
references/rust-general.mdmarkdown8.2 KB
references/rust-general/rust-modern-code.mdmarkdown13.4 KB
references/rust-general/rust-verification-workflow.mdmarkdown5.5 KB
references/rust-general/rust-version-idioms.mdmarkdown7.0 KB
references/swift-general.mdmarkdown5.7 KB
references/swift-general/swift-patterns.mdmarkdown6.7 KB
references/swift-general/swift-security-testing.mdmarkdown6.6 KB
references/swift-general/swift-security.mdmarkdown13.3 KB
references/swift/preferred-patterns.mdmarkdown2.4 KB
references/swift/swift-testing.mdmarkdown6.6 KB
references/swift/task-patterns.mdmarkdown3.6 KB
references/typescript-debugging.mdmarkdown9.3 KB
references/typescript-debugging/debugging-workflows-async-memory.mdmarkdown5.8 KB
references/typescript-debugging/debugging-workflows.mdmarkdown5.6 KB
scripts/bench-compare.shscript7.1 KB
scripts/check-errors.shscript7.1 KB
scripts/check-interface-compliance.shscript6.4 KB
scripts/check-sapcc-auth-ordering.shscript5.5 KB
scripts/check-sapcc-httptest.shscript4.4 KB
scripts/check-sapcc-identify-endpoint.shscript5.8 KB
scripts/check-sapcc-json-strict.shscript4.9 KB
scripts/check-sapcc-time-now.shscript4.2 KB
scripts/check-sapcc-todo-format.shscript4.1 KB
scripts/gen-table-test.shscript4.2 KB
scripts/quality_checker.pyscript16.2 KB
scripts/sync-google-style-guide.pyscript2.5 KB
scripts/validate.pyscript6.3 KB

references/rust-general/rust-version-idioms.md

View on GitHub
# Rust Version Idioms and Gates

Version-pinned idiom table, hard gates, and error-message-to-version map. Check `Cargo.toml` before applying any row: writing a 1.75+ idiom on a project with `rust-version = "1.65"` fails the MSRV check. For how to write each idiom in context (with before/after code), load [rust-modern-code.md](rust-modern-code.md).

```bash
grep -E '^edition|^rust-version' Cargo.toml
# "rust-version = "1.85"" means 1.85 features are available; lower versions: see table below
```

The `rust-version` field in `Cargo.toml`, not the installed toolchain, decides what compiles during `cargo check --all`. A 1.85 toolchain building a crate with `rust-version = "1.75"` rejects 1.76+ language features.

## Idiom Replacement Table (Rust 1.56–1.85)

The most common AI-generated Rust failure mode is old idioms where modern ones exist:

| Outdated Pattern | Modern Replacement | Since |
|-----------------|-------------------|-------|
| `Box<dyn std::error::Error>` as library return | `thiserror`-derived error type | stable |
| `impl From<E> for MyError` by hand | `#[from]` attribute in `thiserror` | stable |
| `if let Some(x) = opt { return Err(...); }` | `let Some(x) = opt else { return Err(...); }` (let-else) | 1.65 |
| `match result { Ok(v) => v, Err(e) => return Err(e) }` | `?` operator | 1.13 |
| Custom iterator struct with `Iterator` impl | `gen { yield item; }` block | 1.85 (2024 edition) |
| `async fn` in trait via `async-trait` macro | `async fn` in trait (stable) | 1.75 |
| `Box<dyn Future<Output = T> + Send>` return from trait | `-> impl Future<Output = T>` in impl (RPITIT) | 1.75 |
| `dyn Error + Send + Sync + 'static` box | `anyhow::Error` in application code | stable |
| `eprintln!("{}", e); process::exit(1)` in main | `fn main() -> anyhow::Result<()>` | stable |
| `serde_json::from_str(s).unwrap()` | `serde_json::from_str(s).context("parse foo")?` | stable |
| `String` parameter in public API | `impl AsRef<str>` or `&str` | stable |
| `Vec<T>` parameter that is only iterated | `impl IntoIterator<Item = T>` or `&[T]` | stable |
| `Arc<Mutex<T>>` in async code | `Arc<tokio::sync::Mutex<T>>` | tokio stable |
| `thread::sleep` in async tests | `tokio::time::pause()` + `tokio::time::advance(d)` | tokio stable |
| `for i in 0..items.len() { let item = &items[i]; }` | `for item in &items { }` | stable |
| Manual `sort_by_key` with allocation | `.sort_by(|a, b| a.key.cmp(&b.key))` | stable |
| `unwrap_or_else(|_| default)` for infallible | `unwrap_or(default)` | stable |
| `if x.is_some() { x.unwrap() }` | `if let Some(v) = x { v }` or `x?` in Result context | stable |
| `HashMap::new()` + manual inserts in tests | `HashMap::from([("k", "v")])` | 1.56 |
| Derive `Clone` + manual `new` for builder | `bon` or `derive_builder` crate | stable |
| `futures::future::join_all(vec)` | `tokio::task::JoinSet` | tokio 1.x |
| `tokio::spawn` drop (fire-and-forget) | Store `JoinHandle`, call `.await` on shutdown | stable |

Notes on the newest rows:
- `let-else` (1.65): the else branch must diverge (return, break, continue, panic, or loop).
- `async fn` in traits (1.75): stable without `async-trait` macro. Dyn dispatch still requires `#[async_trait]` or explicit `Box<dyn Future>` return.
- RPITIT (1.75): `impl Trait` in trait return positions without boxing.
- `gen` blocks (1.85, 2024 edition only): zero-cost iterator authoring in push style. Not available in 2021 edition crates.
- `tokio::time::pause` requires the `test-util` feature: `tokio = { version = "1", features = ["full", "test-util"] }`.

## Hard Gates (STOP / REPORT / FIX)

Framework: `skills/shared-patterns/forbidden-patterns-template.md`.

| Pattern | Why blocked | Fix |
|---------|-------------|-----|
| `.unwrap()` in library code | Panics with no recovery path for the caller | Return `Err(...)` or `.ok_or_else(...)` |
| `.expect("")` (empty string message) | Panic with no diagnostic context | `.expect("user id must be set at this point")` |
| `.clone()` to satisfy the borrow checker | Hides a design flaw; costs allocation | Restructure ownership or use `Arc` / `Rc` explicitly |
| `let _ = result;` / `let _ = tx.send(...)` | Silently discards errors | `result?` or `result.ok()` with explicit intent |
| `err.to_string().contains("...")` | Breaks when messages change | `downcast_ref::<ConcreteError>()` or `matches!(err, MyError::Variant)` |
| `std::thread::sleep` in async code | Blocks the executor thread | `tokio::time::sleep(d).await` |
| `std::sync::Mutex` held across `.await` | Deadlocks under async | `tokio::sync::Mutex` |
| Fire-and-forget `tokio::spawn` (dropped `JoinHandle`) | Panics lost; no shutdown path | Store `JoinHandle`; await on shutdown |
| `Box<dyn std::error::Error>` in library API | Erases error type; callers cannot match variants | `thiserror`-derived enum |

```bash
grep -rn "\.unwrap()" --include="*.rs" | grep -v "_test\|#\[test\]\|mod tests"
grep -rn '\.expect("")' --include="*.rs"
grep -rn 'let _ = ' --include="*.rs"
grep -rn 'to_string().*contains\|contains.*to_string()' --include="*.rs"
grep -rn 'std::thread::sleep' --include="*.rs"
```

Sanctioned exceptions:
- `.unwrap()` in `#[test]` functions where the invariant is obvious and documented.
- `.clone()` when cloning `Arc<T>` — that is the intended use; flag only `.clone()` on large owned types.
- `let _ = handle` when the `JoinHandle` is stored in a shutdown list, not dropped.

## Error Message → Version Map

| Error Message | Root Cause | Fix |
|---------------|------------|-----|
| `error[E0658]: let chains are experimental` | Rust < 1.88 | Use nested `if let` or upgrade MSRV |
| `error[E0658]: use of unstable library feature 'let_else'` | Rust < 1.65 | Upgrade to 1.65+ |
| `error[E0277]: the trait bound ... is not satisfied` on async trait | Rust < 1.75 without `async-trait` | Add `#[async_trait]` or upgrade to 1.75 |
| `error[E0562]: 'impl Trait' only allowed in ... not in return type of trait methods` | Rust < 1.75 (RPITIT) | Upgrade to 1.75 or use `Box<dyn Future>` |
| `error: gen blocks are not stable` | Rust < 1.85 or edition < 2024 | Add `edition = "2024"` and `rust-version = "1.85"` |
| `error[E0106]: missing lifetime specifier` on `&str` field | Struct needs explicit `'a` lifetime | Add `struct Foo<'a> { name: &'a str }` or use `String` |
| `cannot borrow ... as mutable because it is also borrowed as immutable` | Simultaneous mutable and immutable borrows | Restructure: end the immutable borrow before the mutable one |
| `future cannot be sent between threads safely` | `!Send` type held across `.await` | Drop the non-Send value before `.await`, or use `tokio::task::LocalSet` |
| `the trait object ... cannot be made into an object` (object-unsafe trait) | Trait has generic methods or `Self` in signature | Remove generics from the trait or use `Box<dyn AnyTrait>` via `dyn_clone` |
| `error[E0507]: cannot move out of ...` | Move out of borrowed context | `.clone()` (with intent), or restructure to avoid the borrow |
| `overflow evaluating the requirement` (recursive type) | Recursive type without indirection | Wrap in `Box<T>` at one point in the cycle |
rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization.Stars: 470kUpdated Claude CodeCodexVerifiedInstall
academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).Stars: 197kUpdated Claude CodeCodexUnverifiedInstall
doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.Stars: 197kUpdated Claude CodeCodexVerifiedInstall