method-language-detect skill
✓ VerifiedDetects R, Python, or mixed-language signals in repository files to provide language handoff data for downstream skills.
- GitHub stars
- 6
- Files
- 2
- Last commit
- Oct 31, 2026
- License
- MIT
- Allowed tools
- —
What does the method-language-detect skill do?
method-language-detect detects R, Python, or mixed-language signals in repository files to provide language handoff data for downstream skills.
Summary generated from the skill's SKILL.md.
About the method-language-detect skill
Identifying whether a repository uses R, Python, or a combination of both allows agents to route workflows without interrupting the user. This skill analyzes file-system signals, directories, lockfiles, and specific code patterns to determine the technical stack. It is designed for use when downstream skills like method-setup or method-clif require language evidence to select appropriate templates or recipes.
Instead of prompting the user for preferences, the tool produces a canonical handoff envelope containing primary, secondary, and source fields. It relies on local evidence and can fall back to reading configuration files like .methodsmith/config.local.yaml using native file-read tools if signals are missing. If the repository contains SAS or Stata signals instead of Python or R, the skill emits an unknown primary status and suggests the method-sas-stata skill.
Developers use this to automate environment setup and task routing. The output is provided as a __CE_LANG__ signal, which helps other tools decide between language-specific defaults based on the detected primary and secondary languages.
What an agent can do with it
- 1Automate repository setupAn agent should use this skill to determine the correct language defaults for method-setup without asking the user.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the method-language-detect skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the method-language-detect skill in Plugin
/plugin marketplace add sajor2000/methodsmith /plugin install methodsmith@methodsmith
Install the method-language-detect skill in Claude Code
~/.claude/skills/method-language-detect/SKILL.md
$ npx degit sajor2000/methodsmith/plugins/methodsmith/skills/method-language-detect ~/.claude/skills/method-language-detectInstall the method-language-detect skill in Claude Code (project)
.claude/skills/method-language-detect/SKILL.md
$ npx degit sajor2000/methodsmith/plugins/methodsmith/skills/method-language-detect .claude/skills/method-language-detectInstall the method-language-detect skill in Codex
~/.agents/skills/method-language-detect/SKILL.md
$ npx degit sajor2000/methodsmith/plugins/methodsmith/skills/method-language-detect ~/.agents/skills/method-language-detectInstall the method-language-detect skill in Gemini CLI
~/.gemini/skills/method-language-detect/SKILL.md
$ npx degit sajor2000/methodsmith/plugins/methodsmith/skills/method-language-detect ~/.gemini/skills/method-language-detectInstall the method-language-detect skill in Claude.ai
npx degit sajor2000/methodsmith/plugins/methodsmith/skills/method-language-detect method-language-detect && zip -r method-language-detect.zip method-language-detect # claude.ai → Customize → Skills → + → Create skill → Upload a skill → method-language-detect.zip
Automated checks
Ran Nov 15, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work
- Source repository linked and reachablesajor2000/methodsmith/plugins/methodsmith/skills/method-language-detect is public and reachablegithub.com/sajor2000/methodsmith/tree/HEAD/plugins/methodsmi ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit 2026-10-31github.com/sajor2000/methodsmith/commits ↗Pass
- No download-and-run or credential theft in scriptsNo scripts in the skill folderPass
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/sajor2000/methodsmith/blob/HEAD/plugins/methodsmi ↗Pass
- Pre-approved tools are scopedNo pre-approved tools; the agent asks before using onegithub.com/sajor2000/methodsmith/blob/HEAD/plugins/methodsmi ↗Pass
- SKILL.md follows the Agent Skills formatValid name and description; says when to use it; 75 linesgithub.com/sajor2000/methodsmith/blob/HEAD/plugins/methodsmi ↗Pass
SKILL.md
View on GitHubRepository Language Detection
Skill Value
- Problem it solves: Setup and workflow routing need repo evidence before asking users about language preference.
- Use when: Another skill needs language evidence, or the user asks what stack the repo appears to use.
- Output: CE_LANG with primary, secondary, and source fields.
- Ask only if: No user question normally; detection is evidence-only.
- Do not do: Do not treat detection as final user preference when later IDE or explicit user choices narrow the stack.
- Interaction: No user question normally; proceed from the provided inputs and local evidence.
Detects whether the current repository is primarily python, r, both, or unknown using file-system and code-pattern signals only. Do not ask the user to choose a language in this skill. SAS/Stata signals do not become primary values; when they dominate, emit primary=unknown and recommend method-sas-stata.
When this skill activates
- CLIF profile is active (
__CE_CLIF__ active=true) and downstream skills need language-specific recipes method-setupis running and needs a language default without asking- A task requires selecting Python vs R templates and the language is not obvious
- Manual invocation:
method-language-detect
Rule source
Read references/detection-rules.md and apply the scoring table exactly.
Core workflow
Step 1: Collect repository signals
Use repo signals only (files, directories, lockfiles, and source patterns). Do not prompt the user.
Step 2: Score and classify
Apply the detection rules and produce:
primary:python|r|both|unknownsecondary:python|r|nullsource:auto(normal),cached(fallback when repo signals cannot be read), ormanual(only when the user explicitly forced a language elsewhere)
Step 3: Emit canonical handoff envelope
Always emit:
__CE_LANG__ primary=<python|r|both|unknown> secondary=<python|r|null> source=<auto|cached|manual>
Also print one concise banner:
[method-language-detect] primary=<...> secondary=<...> source=<...>
Step 4: Fallback behavior
If no reliable signals are found:
- Use
primary=unknown secondary=null source=auto. - Resolve the repository root with
git rev-parse --show-toplevel, read<repo-root>/.methodsmith/config.local.yamlwith the native file-read tool, and fall back to the main checkout in a linked worktree. Ifstack_profile.language(written bymethod-setup) exists there, reuse it assource=cached; otherwise usestack_profile.inference.language.valuewhen its confidence ishigh. - Never ask the user a language question in this skill.
Consumers
method-setup, method-clif, method-cohort, method-data-qa, method-work, and method-plan can consume __CE_LANG__ to route language-specific defaults and references.
References
@./references/detection-rules.md — Signal weights, thresholds, and tie-break rules
Files in this skill
2method-language-detect skill questions
How do I install the method-language-detect skill in Claude Code?
Run npx degit sajor2000/methodsmith/plugins/methodsmith/skills/method-language-detect ~/.claude/skills/method-language-detect. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the method-language-detect skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
Does this skill ask the user to select a programming language?
No, the skill uses file-system and code-pattern signals only and should never prompt the user to choose a language.
What happens if the skill detects SAS or Stata signals?
SAS/Stata signals are not treated as primary values; if they dominate, the skill emits primary=unknown and recommends the method-sas-stata skill.
What is the output format of the language detection?
The skill emits a canonical handoff envelope containing primary, secondary, and source fields.