kornia-rs
Copilot instructions748 starsChanged 7 days agoApache-2.0View on GitHub
This file provides instructions for GitHub Copilot when working with code in this repository. Before any task, read the relevant skill in .claude/skills/ (see the table in AGENTS.md). Before opening a PR, self-review with kornia-code-review and paste its output in the Self-review section of .github/pullrequesttemplate.md, which the PR body must follow. When reviewing, follow kornia-code-review (out-of-scope changes and missing benchmarks are blocking). When a change touches a fact the skills describe, follow kornia-curation. pixi run pr-check is the pre-PR gate.
We split this copilot-instructions.md into the rules it gives an agent
19 rules. About 0 are common, 12 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Follow the coding standards and best practices defined in CONTRIBUTING.md.
- Very specific: line 15
CRITICAL: All contributions must comply with the AI_POLICY.md.
- Distinctive: line 19
All AI-assisted contributions require human oversight and validation
- Distinctive: line 20
Ensure code logic reflects genuine understanding, not copied AI output
- Very specific: line 25
Follow AI_POLICY.md §3 and the kornia-code-review skill.
- Distinctive: line 29
Code style: Follow Rust conventions, use rustfmt for formatting, and clippy for linting.
- Very specific: line 31
Documentation: Follow rustdoc guidelines (/// for public items, //!
- Very specific: line 32
Testing: Write unit tests (in #[cfg(test)] modules) and integration tests.
- Very specific: line 33
Error handling: Prefer Result<T, E> with descriptive error types (e.g., via thiserror).
- Distinctive: line 34
Dependencies: Follow Rust dependency guidelines.
- Very specific: line 35
Use kornia-rs: Always prefer kornia-rs utilities over reinventing functionality
- Distinctive: line 56
When reviewing code changes, verify:
- Distinctive: line 71
When reviewing pull requests, ensure strict alignment with the linked issue:
- Distinctive: line 74
Verify the PR description contains a valid issue reference (e.g., "Fixes #123" or "Closes #123")
- Very specific: line 77
Self-review: Start from the author's pasted kornia-code-review output.
- Distinctive: line 80
Critical: Verify that the PR implementation strictly matches what the issue describes
- Distinctive: line 82
If the PR includes additional features or changes not mentioned in the issue, request that those be split into separate issues/PRs
- Distinctive: line 85
Issue fit: If the linked issue does not fit the project's direction, say so.
- Distinctive: line 87
Reviewer Action: If the PR does not match the issue scope or requirements, clearly explain the mismatch and request that the PR be updated …
≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Kornia-rs Repository Instructions
This file provides instructions for GitHub Copilot when working with code in this repository.
Skills
Before any task, read the relevant skill in .claude/skills/ (see the table in AGENTS.md). Before opening a PR, self-review with kornia-code-review and paste its output in the Self-review section of .github/pull_request_template.md, which the PR body must follow. When reviewing, follow kornia-code-review (out-of-scope changes and missing benchmarks are blocking). When a change touches a fact the skills describe, follow kornia-curation. pixi run pr-check is the pre-PR gate.
Coding Standards
Follow the coding standards and best practices defined in CONTRIBUTING.md.
AI Policy
CRITICAL: All contributions must comply with the AI_POLICY.md. Review that document for complete requirements.
Core Principles:
- Code and comments must not be direct, unreviewed outputs of AI agents
- All AI-assisted contributions require human oversight and validation
- Ensure code logic reflects genuine understanding, not copied AI output
- The submitter is the Sole Responsible Author for every line of code
Instructions for Reviewers
Follow AI_POLICY.md §3 and the kornia-code-review skill. Do not speculate about whether or how AI was used; judge the change.
Key Guidelines
- Code style: Follow Rust conventions, use rustfmt for formatting, and clippy for linting. Edition 2021, MSRV 1.89.
- Type system: Leverage Rust's type system for safety. Use clear, descriptive types. Avoid unnecessary type annotations where inference is clear.
- Documentation: Follow rustdoc guidelines (
///for public items,//!for crate-level docs) and match the existing codebase style. See CONTRIBUTING.md for details. - Testing: Write unit tests (in
#[cfg(test)]modules) and integration tests. Keep tests deterministic and focused. - Error handling: Prefer
Result<T, E>with descriptive error types (e.g., viathiserror). Avoid.unwrap()/.expect()in library code. - Dependencies: Follow Rust dependency guidelines. Be mindful of transitive dependencies and their impact on build times and binary size.
- Use kornia-rs: Always prefer
kornia-rsutilities over reinventing functionality
Running Checks
pixi run rust-lint # Format, clippy, and check
pixi run rust-fmt # Format Rust code
pixi run rust-clippy # Run clippy linting
pixi run rust-test # Run Rust tests
pixi run rust-check # Check Rust compilationFor Python bindings:
pixi run py-build # Build Python bindings
pixi run py-test # Test Python bindingsReview Checklist
When reviewing code changes, verify:
- Code and comments are not direct, unreviewed AI agent outputs
- Code follows guidelines in CONTRIBUTING.md
- Code complies with AI_POLICY.md (especially Laws 1, 2, and 3)
- Tests are included for new functionality
- Code passes
pixi run rust-lintandpixi run rust-test - PR includes proof of local test execution (test logs)
- Code uses
kornia-rsutilities instead of reinventing existing functionality - Error handling uses
Result<T, E>appropriately - No
.unwrap()or.expect()in library code (except in tests or where explicitly documented) - Comments are written in English and verified by a human with a good understanding of the code
PR-Issue Alignment Review
When reviewing pull requests, ensure strict alignment with the linked issue:
- Issue Link Verification:
- Verify the PR description contains a valid issue reference (e.g., "Fixes #123" or "Closes #123")
- Confirm the linked issue exists and is open (or was open when the PR was created)
- Self-review: Start from the author's pasted
kornia-code-reviewoutput; check its findings against the diff rather than repeating the review. - Scope Matching:
- Critical: Verify that the PR implementation strictly matches what the issue describes
- The PR should not include changes beyond the scope of the linked issue
- If the PR includes additional features or changes not mentioned in the issue, request that those be split into separate issues/PRs
- Compare the PR description, code changes, and tests against the issue description to ensure alignment
- Issue fit: If the linked issue does not fit the project's direction, say so; approval or assignment is not required before a PR.
Reviewer Action: If the PR does not match the issue scope or requirements, clearly explain the mismatch and request that the PR be updated to strictly align with the issue, or that additional changes be moved to separate issues/PRs.
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- kornia-api-flavorSkill
- kornia-archSkill
- kornia-bindingsSkill
- kornia-code-reviewSkill
- kornia-coding-styleSkill
- kornia-curationSkill
- kornia-simdSkill
- kornia-workflowSkill
- releaseSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

