code-attribution
Skill3 starsChanged 2 days agoApache-2.0View on GitHub
Forensic code comparison between PRs to detect attribution issues where code approaches from one PR appear in another without credit. Use when investigating whether closed PRs were reimplemented by others.
In this repository37 other files it gives its agents.
- docs/manual/agents.mdAGENTS.md
- ablate-combined-changesSkill
- agent-supervisor-methodologySkill
- benchmark-comparisonSkill
- browser-vlm-acceptanceSkill
- claim-verificationSkill
- claude-code-best-practicesSkill
- comms-connectSkill
- condition-based-waitingSkill
- conference-intelligenceSkill
- deep-research-methodologySkill
- defense-in-depthSkill
- detect-deployment-thrashingSkill
- directory-cross-examinationSkill
- doc-freshness-auditorSkill
- eval-harnessSkill
- github-comment-managerSkill
- github-deep-researchSkill
- github-issue-responseSkill
- harness-setupSkill
- issue-closure-strategistSkill
- issue-quality-assessmentSkill
- k8s-configmap-runtime-patchSkill
- k8s-config-persistence-trapSkill
- maintainer-profilingSkill
- measure-before-theorizeSkill
- multi-phase-optimization-campaignSkill
- phase-trackerSkill
- pptx-slide-creationSkill
- pr-issue-scannerSkill
- public-root-reproducibilitySkill
- repo-organizerSkill
- root-cause-tracingSkill
- technique-versioning-workflowSkill
- wrong-layer-debuggingSkill
- wrong-theory-cascade-preventionSkill
- youtube-transcriberSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 124
Always consider that independent discovery of the same solution is common.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill 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
Code Attribution Analysis Skill
Perform forensic comparison between PRs to determine if code approaches were adopted without attribution. Produces evidence chains with confidence scores.
Usage
/code-attribution [repo] [source-pr] [suspect-pr]$ARGUMENTS[0]= repository (e.g.,owner/repo)$ARGUMENTS[1]= source PR number (the original, typically closed without merge)$ARGUMENTS[2]= suspect PR number (the potentially copied PR, typically merged)
Evidence Collection Workflow
Step 1: Pull Both Diffs
# Source PR (original work)
gh pr diff SOURCE_PR --repo REPO > /tmp/source_pr.diff
# Suspect PR (potentially adopted)
gh pr diff SUSPECT_PR --repo REPO > /tmp/suspect_pr.diffStep 2: Extract Key Code Patterns
# Get only added lines (the actual contributions)
grep "^+" /tmp/source_pr.diff | grep -v "^+++" > /tmp/source_additions.txt
grep "^+" /tmp/suspect_pr.diff | grep -v "^+++" > /tmp/suspect_additions.txt
# Find common patterns (excluding trivial matches like braces, includes)
comm -12 <(sort /tmp/source_additions.txt) <(sort /tmp/suspect_additions.txt) | \
grep -v "^+$" | grep -v "^+[{}]$" | grep -v "^+#include"Step 3: Timeline Analysis
# Source PR creation date
gh pr view SOURCE_PR --repo REPO --json createdAt,closedAt
# Suspect PR creation date
gh pr view SUSPECT_PR --repo REPO --json createdAt,mergedAt
# Was suspect PR created AFTER source PR was visible?
# Key: If source was open/reviewed before suspect was created = opportunity to see the codeStep 4: Review Activity Cross-Reference
# Did the suspect PR author review or comment on the source PR?
gh api repos/OWNER/REPO/pulls/SOURCE_PR/reviews
gh api repos/OWNER/REPO/pulls/SOURCE_PR/comments
gh api repos/OWNER/REPO/issues/SOURCE_PR/commentsStep 5: Scoring Criteria
| Evidence Type | Weight | Score Range |
| Code similarity (line-by-line match %) | 30% | 0-10 |
| Non-standard choices (same unusual constant, same batch size, same variable name) | 25% | 0-10 |
| Timeline (source visible before suspect created) | 20% | 0-10 |
| Review visibility (suspect author saw source PR) | 15% | 0-10 |
| Outcome (suspect merged quickly, source closed) | 10% | 0-10 |
Confidence Score = Weighted Average
- 9-10: Near-certain attribution issue
- 7-8: Strong evidence, likely attribution issue
- 5-6: Moderate evidence, possible coincidence
- 3-4: Weak evidence, likely independent work
- 0-2: No evidence of attribution issue
Step 6: Key Indicators
Strong indicators of attribution:
- Identical constant names that are not industry standard
- Same non-obvious numeric values (batch size 16 when 32/64 are standard)
- Same code structure with cosmetic-only differences (variable renames)
- Source PR reviewed by suspect PR author or team member
- Suspect PR created days after source PR review activity
Weak indicators (could be coincidence):
- Same algorithmic approach (may be obvious solution)
- Same library API calls (limited options)
- Similar comments/documentation (standard patterns)
Output Format
# Code Attribution Analysis
**Source PR:** #NUMBER - TITLE
**Suspect PR:** #NUMBER - TITLE
**Confidence Score:** X/10
## Timeline
- Source created: DATE
- Source last reviewed: DATE
- Suspect created: DATE
- Suspect merged: DATE
## Code Comparison
[Side-by-side diff of matching patterns]
## Non-Standard Choices
[List of unusual matching decisions]
## Review Cross-Reference
[Did suspect author see source PR?]
## Verdict
[ATTRIBUTION ISSUE / LIKELY INDEPENDENT / INSUFFICIENT EVIDENCE]Important Notes
- This skill gathers EVIDENCE, not accusations. Present findings objectively.
- Always consider that independent discovery of the same solution is common.
- Focus on non-obvious choices (constant names, batch sizes, structure) over algorithmic similarity.
- Save all evidence with timestamps for reproducibility.
<!-- imported on 2026-10-31 by tools/import-skills.py from a native Claude Code instance's skill library; the source site's names, ids, hosts and paths are scrubbed to <placeholders>; its other files were not copied -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

