Add Uint Support
pytorch/pytorch
Add unsigned integer (uint) type support to PyTorch operators by updating ATDISPATCH macros.
A skill your agent uses when adding a new PyTorch model to Pyrefly's shape-tracking example corpus under tensor-shapes/pyrefly-torch-stubs/examples — i.e.
$ npx skills add facebook/pyrefly --skill add-torch-shapes-example -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install facebook/pyrefly add-torch-shapes-example --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/facebook/pyrefly.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/add-torch-shapes-example .claude/skills/add-torch-shapes-example && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "add-torch-shapes-example" agent skill from https://github.com/facebook/pyrefly/tree/main/.agents/skills/add-torch-shapes-example into .claude/skills/add-torch-shapes-example/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-torch-shapes-example", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/facebook/pyrefly/tree/main/.agents/skills/add-torch-shapes-exampleType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add facebook/pyrefly --skill add-torch-shapes-example -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install facebook/pyrefly add-torch-shapes-example --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/facebook/pyrefly.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/add-torch-shapes-example .agents/skills/add-torch-shapes-example && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "add-torch-shapes-example" agent skill from https://github.com/facebook/pyrefly/tree/main/.agents/skills/add-torch-shapes-example into .agents/skills/add-torch-shapes-example/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-torch-shapes-example", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add facebook/pyrefly --skill add-torch-shapes-example -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install facebook/pyrefly add-torch-shapes-example --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/facebook/pyrefly.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/add-torch-shapes-example .cursor/skills/add-torch-shapes-example && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "add-torch-shapes-example" agent skill from https://github.com/facebook/pyrefly/tree/main/.agents/skills/add-torch-shapes-example into .cursor/skills/add-torch-shapes-example/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-torch-shapes-example", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/facebook/pyrefly.git --path .agents/skills/add-torch-shapes-example--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add facebook/pyrefly --skill add-torch-shapes-example -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install facebook/pyrefly add-torch-shapes-example --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/facebook/pyrefly.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/add-torch-shapes-example .gemini/skills/add-torch-shapes-example && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "add-torch-shapes-example" agent skill from https://github.com/facebook/pyrefly/tree/main/.agents/skills/add-torch-shapes-example into .gemini/skills/add-torch-shapes-example/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-torch-shapes-example", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install facebook/pyrefly add-torch-shapes-exampleInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add facebook/pyrefly --skill add-torch-shapes-example -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/facebook/pyrefly.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/add-torch-shapes-example .github/skills/add-torch-shapes-example && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "add-torch-shapes-example" agent skill from https://github.com/facebook/pyrefly/tree/main/.agents/skills/add-torch-shapes-example into .github/skills/add-torch-shapes-example/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-torch-shapes-example", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add facebook/pyrefly --skill add-torch-shapes-example -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install facebook/pyrefly add-torch-shapes-example --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/facebook/pyrefly.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/add-torch-shapes-example .opencode/skills/add-torch-shapes-example && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "add-torch-shapes-example" agent skill from https://github.com/facebook/pyrefly/tree/main/.agents/skills/add-torch-shapes-example into .opencode/skills/add-torch-shapes-example/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-torch-shapes-example", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
add-torch-shapes-exampleA skill your agent uses when adding a new PyTorch model to Pyrefly's shape-tracking example corpus under tensor-shapes/pyrefly-torch-stubs/examples — i.e.
Add Torch Shapes Example is an agent skill from facebook/pyrefly, published by the product's own GitHub organization. Use when adding a new PyTorch model to Pyrefly's shape-tracking example corpus under tensor-shapes/pyrefly-torch-stubs/examples — i.e. importing a model as a tested, corpus-quality reference port. This is maintainer-facing fbsource work. For porting your own model elsewhere, use the porting skill directly; for fixing a wrong/missing shape rule, use modify-shaped-array-dsl.
Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering, covering Deep learning. It works with PyTorch. The repository describes itself as: A fast type checker and language server for Python. The licence is MIT.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 6bc6ea9. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
python3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Add Torch Shapes Example loads about 1.3k tokens when it runs. Until then it costs about 100 tokens; SKILL.md has 619 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from facebook/pyrefly at commit 6bc6ea9, republished under its MIT licence (© facebook). 619 words, ~1,346 tokens.
.claude/skills/add-torch-shapes-example/SKILL.md (or your agent's skills folder).You are importing a PyTorch model into Pyrefly's example corpus at
tensor-shapes/pyrefly-torch-stubs/examples/. This is the contribution case the porting
skill describes: these ports are tested reference material that others read to
learn the patterns, so produce its fuller deliverable — paste every artifact
(audit table, per-local reveal_type dumps, typed-interface receipts, exhaustive
assert_type coverage, completion report) in full, not just the annotated model.
Why these ports matter. They demonstrate what happens when you write a real PyTorch model with tensor shape types. Record the upstream repository and revision, exact files or dependency closure, concrete configuration, entry points, and train/eval/cache/export modes included. "Complete" means complete inside that declared boundary; list any omitted wrapper or mode rather than calling a representative core the full upstream model.
Start from evidence, not a blank page. Before editing, skim two or three existing examples with the closest architecture and mine the upstream source for shape comments, docstrings, reshape/einsum equations, runtime assertions, and tests. Treat that evidence as a hypothesis to verify with Pyrefly, not text to copy. The existing ports demonstrate that substantial real models normally reach useful shape coverage after a few checker-guided iterations.
Improving the stubs is the point, not a side quest. First distinguish a
true stub gap from an unavailable overlay symbol, Any, a declared gradual
return, third-party code, or unrepresentable dynamic construction. Fix genuine
general stub gaps in the corpus case rather than hiding them in the model. A
corpus port may retain a narrow precise cast, typed interface, or gradual
boundary for heterogeneous containers, dynamic factories, mutable caches, or
untyped external backends. Preserve every known public dimension and document
the boundary. Propose, but do not perform, a runtime rewrite unless the user
separately requests it.
Do the actual porting by reading and following the add-shape-types-to-torch-model
skill's SKILL.md (in tensor-shapes/skills/add-shape-types-to-torch-model/) end to
end — its gated workflow (pre-flight gates → per-module loop → verification) is the
algorithm.
The general skill has two setup choices; for corpus work both are already resolved, so do not stop to ask: use the Buck check below, and treat stub improvements as in scope. Produce all of the corpus artifacts it requests.
Write the port at tensor-shapes/pyrefly-torch-stubs/examples/<model>.py.
Every class, function, method, entry point, configuration, and mode inside the
declared upstream boundary belongs in the port. Do not silently shrink that
boundary when a difficult construct appears.
The porting skill's verification phase tells you to run verify_port.sh and the
actual Pyrefly check. Run these commands from the fbcode/pyrefly checkout root.
First ensure the shared tensor-shapes virtual environment exists; add
--fwdproxy when the host needs it:
python3 tensor-shapes/bootstrap_venv.py
buck build fbcode//pyrefly/tensor-shapes:torch-stubs-search-path
SEARCH_ROOT="$(buck targets --show-output fbcode//pyrefly/tensor-shapes:torch-stubs-search-path | awk '{print $2}')"
VENV="${TENSOR_SHAPES_VENV:-$HOME/.tensor-shapes-venv}"
SITE="$("$VENV/bin/python" -c 'import site; print(site.getsitepackages()[0])')"
buck run fbcode//pyrefly:pyrefly -- check --config /dev/null \
--python-version 3.13 --search-path "$SEARCH_ROOT" \
--site-package-path "$SITE" \
tensor-shapes/pyrefly-torch-stubs/examples/<model>.pyIf the model imports einops, also pass
--search-path tensor-shapes/pyrefly-einops-stubs; otherwise an einops call can
silently appear to preserve its input shape. The result must be 0 errors, with
no leftover reveal_type.
Then run the corpus test target so the new example is covered by CI and checked with the real Torch fallback modules:
python3 tensor-shapes/pyrefly-torch-stubs/run_pyrefly.py --buck --suite torch-examplesWhen shape precision is missing, first distinguish among an unavailable symbol
in the partial overlay, Any, a declared gradual Tensor, a third-party
boundary, and a true stub-signature gap. Add or refine a general stub when that
is the right fix. A corpus port may retain a documented boundary for
unrepresentable dynamic construction; it should not hide an easily fixable stub
gap.
A wrong shape (Pyrefly computes a concrete shape that's incorrect) or a missing
shape that can't be expressed by a stub signature alone is a shape-DSL change: see
the modify-shaped-array-dsl skill. That skill insists on unit-testing the DSL
logic, not just relying on this example to exercise it. Don't reach for the DSL
for shapes a stub signature could express.
© facebook, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/add-torch-shapes-example of facebook/pyrefly.
Open the folder on GitHubat commit 6bc6ea9
Add Torch Shapes Example next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Add Torch Shapes Example this skillfacebook/pyrefly | 7.1k | — | ~1.3k | Automated safety check: Pass | MIT | |
| Add Uint Supportpytorch/pytorch | 104k | 2 repos | ~2.3k | Automated safety check: Pass | Custom licence | |
| CLIP Image-Text MatchingOrchestra-Research/AI-Research-SKILLs | 13k | 8 repos | ~1.7k | Automated safety check: Pass | MIT | |
| Interview Cheatsheetwanshuiyin/ARIS-in-AI-Offer | 580 | 1 repos | ~3.4k | Automated safety check: Notes | MIT | |
| Ghstack CIpytorch/pytorch | 104k | — | ~1.4k | Automated safety check: Pass | Custom licence | |
| MUSA GPU Training Optimizeropen-infra-skills/infra-skills | 141 | — | ~1.7k | Automated safety check: Pass | Apache-2.0 |
pytorch/pytorch
Add unsigned integer (uint) type support to PyTorch operators by updating ATDISPATCH macros.
Orchestra-Research/AI-Research-SKILLs
Explains OpenAI's CLIP model for zero-shot image classification, image-text similarity, semantic image search and content moderation, with install steps and code patterns.
wanshuiyin/ARIS-in-AI-Offer
Generate a long-form Chinese interview-prep cheat sheet on a specific ML/LLM topic — formulas with derivations, from-scratch PyTorch code, comparison tables, and 25 高频面试题 (L1 必会 / L2 进阶 / L3 顶级 lab).
pytorch/pytorch
Manage CI for PyTorch ghstack stacks by running CI where its results are useful now and deferring other PRs with [no-ci].
open-infra-skills/infra-skills
Profiles, benchmarks and tunes AI training workloads on Moore Threads MUSA GPUs with a measurement-first process that keeps model behavior unchanged.
SharpAI/DeepCamera
Real-time depth map privacy transforms using Depth Anything v2 (CoreML + PyTorch)
facebook/pyrefly
Run Pyrefly benchmarks locally via Buck or Cargo, including PyTorch real-world LSP benchmarks.
facebook/pyrefly
A skill your agent uses when Pyrefly computes a wrong tensor shape (or is missing one that can't be expressed in a stub signature) and you need to add or fix a shape-DSL rule.
facebook/pyrefly
Port a PyTorch model to use pyrefly's tensor shape type system (Tensor[[B, C, H, W]], Int[T]).
facebook/pyrefly
Produces a scorecard evaluating a pyrefly change on correctness and quality.
facebook/pyrefly
Reviews a comma separated pyrefly diff according to the pyrefly review best practices.
Works with
Categories
A skill your agent uses when adding a new PyTorch model to Pyrefly's shape-tracking example corpus under tensor-shapes/pyrefly-torch-stubs/examples — i.e. Add Torch Shapes Example is an agent skill from facebook/pyrefly, published by the product's own GitHub organization.e.
Add Torch Shapes Example fits situations like: adding a new PyTorch model to Pyreflys shape-tracking example corpus under tensor-shapes/pyrefly-torch-stubs/examples — i.e; tasks that involve Deep learning.
Run `npx skills add facebook/pyrefly --skill add-torch-shapes-example -a claude-code`. Or copy the skill folder (.agents/skills/add-torch-shapes-example in facebook/pyrefly) into .claude/skills/add-torch-shapes-example in your project. Claude Code loads it when a task matches its description.
Run `npx skills add facebook/pyrefly --skill add-torch-shapes-example -a codex`. Or copy the skill folder (.agents/skills/add-torch-shapes-example in facebook/pyrefly) into .agents/skills/add-torch-shapes-example in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add facebook/pyrefly --skill add-torch-shapes-example -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-torch-shapes-example, .gemini/skills/add-torch-shapes-example, .github/skills/add-torch-shapes-example and .opencode/skills/add-torch-shapes-example in your project.
Going by SKILL.md and its folder, Add Torch Shapes Example needs the command-line tools its instructions call (python3). Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Add Torch Shapes Example is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.3k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Add Torch Shapes Example: Add Uint Support (pytorch/pytorch, 104k stars), CLIP Image-Text Matching (Orchestra-Research/AI-Research-SKILLs, 13k stars), Interview Cheatsheet (wanshuiyin/ARIS-in-AI-Offer, 580 stars) and Ghstack CI (pytorch/pytorch, 104k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
facebook (a GitHub organization, an official publisher) maintains it in facebook/pyrefly, which has 7,054 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 8, 2026.
Source: facebook/pyrefly on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.