Agent skill

Merge Oier

by OIerDb-ng in OIerDb-ng/OIerDb

Merge incorrectly split OIer entries in data/raw.txt. An agent skill from OIerDb-ng/OIerDb.

AGPL-3.0Auto-check passed

Install Merge Oier

skills CLI
$ npx skills add OIerDb-ng/OIerDb --skill merge-oier -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OIerDb-ng/OIerDb merge-oier --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OIerDb-ng/OIerDb.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/merge-oier .claude/skills/merge-oier && rm -rf skills-src

Use ~/.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/

Facts

Skill name
merge-oier
GitHub stars
976
Token cost
~1.9k tokens
SKILL.md length
1,017 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Merge incorrectly split OIer entries in data/raw.txt. An agent skill from OIerDb-ng/OIerDb.

  • Works in 6 steps: Identify the person → Find all entries and assess → Analyze and propose a merge plan → …
  • The user wants to merge
  • SKILL.md covers Data Format, How Identifiers and Merging Work, URL → Name Lookup and Pre-step: Fetch issue context…, plus 2 more sections
  • Calls gh; reaches oier.baoshuo.dev

What it does

Merge Oier is an agent skill from OIerDb-ng/OIerDb. Merge incorrectly split OIer entries in data/raw.txt. Use this skill when the user wants to merge, combine, or fix duplicate entries for the same competitor (选手) in the OIerDb data. Triggers on phrases like "merge these oiers", "combine entries", "这些选手是同一个人", "合并", "拆分错了", or when the user provides OIerDb URLs, names, or competition details and asks to fix split/duplicated records. Also trigger when the user mentions identifiers (标识符) in the context of distinguishing same-named competitors.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: A database for Chinese OI participants. The licence is AGPL-3.0.

When your agent uses it

  • The user wants to merge
  • Fix duplicate entries for the same competitor (选手) in the OIerDb data
  • Phrases like merge these oiers
  • Combine entries

Example prompts

  • “merge these oiers”
  • “combine entries”
  • “这些选手是同一个人”
  • “/merge-oier”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Identify the person
  2. Find all entries and assess
  3. Analyze and propose a merge plan
  4. Present findings and confirm with the user
  5. Execute the merge
  6. Commit

What it can do on your machine

Read from SKILL.md and the folder at commit a2f346a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • oier.baoshuo.dev

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Merge Oier loads about 1.9k tokens when it runs. Until then it costs about 127 tokens; SKILL.md has 1,017 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~127
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from OIerDb-ng/OIerDb at commit a2f346a, republished under its AGPL-3.0 licence (© OIerDb-ng). 1,017 words, ~1,924 tokens.

Download SKILL.mdSave it as .claude/skills/merge-oier/SKILL.md (or your agent's skills folder).
name
merge-oier
description
Merge incorrectly split OIer entries in data/raw.txt. Use this skill when the user wants to merge, combine, or fix duplicate entries for the same competitor (选手) in the OIerDb data. Triggers on phrases like "merge these oiers", "combine entries", "这些选手是同一个人", "合并", "拆分错了", or when the user provides OIerDb URLs, names, or competition details and asks to fix split/duplicated records. Also trigger when the user mentions identifiers (标识符) in the context of distinguishing same-named competitors.

Merge OIer Entries

You help the user merge competitor entries in data/raw.txt that were incorrectly split into separate records. The file is large (~290K lines), so always use grep/awk to search — never read the entire file.

Data Format

Each non-comment, non-empty line has exactly 9 comma-separated fields:

比赛名,奖项,姓名,年级,学校,分数,省份,性别,标识符
  • Lines starting with # are comments.
  • 性别 and 标识符 may be empty strings.
  • 标识符 is the key field for distinguishing different people with the same name.

How Identifiers and Merging Work

The codebase (oier.py, main.py) uses (name, 标识符) as the key to identify a unique OIer. Entries sharing the same key are always treated as one person.

  • Without identifiers: entries go through auto-merge via Record.distance() (threshold=240), which checks school, province, grade, gender, and competition timeline consistency.
  • With an identifier: the OIer is locked — auto-merge will never split or merge it with others. All entries with the same (name, identifier) are one person.

This means: to force-merge incorrectly split entries, assign them the same identifier. To prevent merging, assign different identifiers. The absence of identifiers does not necessarily mean entries are split — auto-merge may have handled them correctly. But if the user is requesting a merge, auto-merge has failed for this case.

URL → Name Lookup

If the user provides a URL like https://oier.baoshuo.dev/oier/124550, the number is the effective line number (1-based, counting only non-comment, non-empty lines). To find the name:

bash
awk 'BEGIN{n=0} /^[^#]/{n++; if(n==TARGET_ID){print NR": "$0; exit}}' data/raw.txt

Extract the 3rd field (姓名) from that line. Always output the name first so the user can confirm before any changes.

Pre-step: Fetch issue context (if applicable)

If the user provides a GitHub issue number (e.g., "merge #123" or mentions an issue), fetch it first:

bash
gh issue view <number>

Extract relevant details from the issue body: names, URLs, provinces, schools, and any merge instructions. Use these as supplementary input alongside whatever the user provides directly. Proceed to Step 1 with all collected information.

Workflow

Step 1: Identify the person

From the user's input, extract names, URLs, competition names, provinces, schools, grades, or any other identifying info. Use these to locate candidate entries.

If a URL is given, resolve the name using the lookup above. If only a name is given, search directly:

bash
grep -n '姓名' data/raw.txt

For precise matching on the 姓名 column (avoiding false matches from school names etc.):

bash
awk -F',' '!/^#/ && $3=="姓名" {print NR": "$0}' data/raw.txt
Step 2: Find all entries and assess

Review all matching lines. Group them by person using the context the user provided (province, school, competition timeline). Determine:

  • Which entries belong to the person the user wants to merge.
  • Whether other entries exist for the same name but belong to different people.
  • Which entries already have identifiers.
Step 3: Analyze and propose a merge plan

Scenario A — No other entries for this name (all entries belong to the same person):

  • Assign a unique identifier (conventionally A) to all entries.
  • This is the simplest case.

Scenario B — Other entries exist (multiple people share the same name):

  • List all entries, grouped by person.
  • Identify which entries should be merged together.
  • For entries that already have identifiers, keep them.
  • For entries without identifiers, assign new ones following the existing naming pattern or using letters A, B, C, D, etc. in order.
  • Present the full plan clearly, showing each person and their assigned identifier.
Step 4: Present findings and confirm with the user

Before asking for confirmation, output a detailed summary of the found entries grouped by person. For each group, show:

  1. All entries in chronological order (by contest year), with each line's contest, level, grade, school, province, score, and existing identifier.
  2. Grade progression: the sequence of grades across entries, using → as separator. Example: 年级:小学/无 → 五年级 → 六年级 → 初一 → 初二 → 初三 → 高一 → 高二
  3. School progression: the sequence of schools, deduplicated where consecutive entries share the same school. Example: 学校:燕山小学 → 长沙市燕山小学 → 长沙市湘郡培粹实验中学 → 长沙市长郡中学

After presenting the summary, use AskUserQuestion to propose the merge plan and get confirmation:

  • Which person's entries are being merged.
  • What identifiers will be assigned (and to which lines).
  • Any ambiguous cases.

If anything is unclear, ask. Never proceed without explicit user approval.

Show full SKILL.md (359 more words)Show less
Step 5: Execute the merge

Important: The Edit tool requires that the file has been read with Read at least once in the conversation before editing. Since raw.txt is too large to read entirely, use Read with offset and limit to read just the lines around each target line (e.g., offset=line_number-1, limit=3). This satisfies the prerequisite without loading the whole file.

Then use the Edit tool to update the 标识符 field in each affected line. The 标识符 is the 9th and last field — do not add a trailing comma after it. Typical replacements:

  • Empty gender + empty identifier (line ends ,,): replace with ,标识符 (no trailing comma).
  • Non-empty gender + empty identifier (line ends 男,): replace with 男,标识符.
  • Existing identifier to change: replace the old identifier with the new one directly.

Remember:

  • Do not change the relative order of lines — only modify fields within a line.
  • Preserve all other fields exactly as they are.
  • The edit old_string must be unique in the file; include enough surrounding context to ensure uniqueness (e.g., the full line content, or a long enough substring combining name + school + contest).
  • If editing multiple lines, you can Read a small range that covers all of them in one call, then edit each line individually.
Step 6: Commit

After completing all edits, use AskUserQuestion to ask the user whether to commit. Provide a default commit title following this format:

data: fix {姓名} ({省份列表,用半角逗号分隔})

For example, if merging entries for 王泽宇 across 江苏 and 上海, the default title would be data: fix 王泽宇 (江苏,上海).

If an issue number was provided in the pre-step, append the following line to the commit message body:

Resolves {owner}/{repo}#{issue_number}.

Then create the commit with the approved title and message.

Important Rules

  • Never read raw.txt without grep/awk filters — it's too large.
  • Always confirm the person's name before making changes.
  • Always get user approval before executing a merge.
  • When searching, prefer awk -F',' '$3=="姓名"' for precise name matching to avoid false positives from school names or other fields containing the name.
  • If the user provides conflicting information, ask for clarification rather than guessing.
  • 标识符 can be any string, not just single letters — check existing identifiers for the same name to follow the established pattern.

© OIerDb-ng, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/merge-oier of OIerDb-ng/OIerDb.

Open the folder on GitHubat commit a2f346a

Compare with similar skills

Merge Oier 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.

Merge Oier compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Merge Oier this skillOIerDb-ng/OIerDb976—~1.9kAutomated safety check: PassAGPL-3.0
Mergeremotion-dev/remotion63k—~508Automated safety check: PassCustom licence
Mergewithastro/astro63k—~153Automated safety check: PassCustom licence
Merge Upsymfony/symfony31k—~4kAutomated safety check: PassMIT
Mergealirezarezvani/claude-skills28k—~587Automated safety check: PassMIT
Merging PRsPostHog/posthog40k—~4.1kAutomated safety check: PassCustom licence

Similar skills

  • Merge

    remotion-dev/remotion

    Official

    Wait for a Remotion pull request to become mergeable, handle merge conflicts, distinguish genuine CI failures from flakes, rerun flaky checks through the flake skill, and merge the PR.

    63k GitHub stars~508 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Merge

    withastro/astro

    Official

    Handle main-to-next merge tasks including conflict resolution, changeset cleanup, and CI fix-ups.

    63k GitHub stars~153 tokensUpdated yesterday
    Auto-check passed
  • Merge Up

    symfony/symfony

    Cascade-merge maintained Symfony branches from oldest to newest (e.g.

    31k GitHub stars~4k tokensUpdated today
    DevelopmentAuto-check passed
  • Merge

    alirezarezvani/claude-skills

    Merge the winning agent's branch into base, archive losers, and clean up worktrees.

    28k GitHub stars~587 tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Merging PRs

    PostHog/posthog

    Official

    Merge a PR into master through the Trunk merge queue and babysit it until it lands.

    40k GitHub stars~4.1k tokensUpdated yesterday
    Auto-check passed
  • Merges a source branch into the current branch across ToolJet's root repo and its server/ee and frontend/ee submodules, handling conflicts and submodule order.

    41k GitHub stars~2.1k tokensUpdated yesterday
    DevelopmentAuto-check: warnings

More from OIerDb-ng/OIerDb

  • Merge School

    OIerDb-ng/OIerDb

    Merge incorrectly split school entries in data/school.txt. An agent skill from OIerDb-ng/OIerDb.

    976 GitHub stars~1.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Add Contest

    OIerDb-ng/OIerDb

    Append a newly-published competition's award list into this repo

    976 GitHub stars~3.7k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Merge Oier

What does Merge Oier do?

Merge incorrectly split OIer entries in data/raw.txt. An agent skill from OIerDb-ng/OIerDb. Merge Oier is an agent skill from OIerDb-ng/OIerDb.txt.

When should I use Merge Oier?

Merge Oier fits situations like: the user wants to merge; fix duplicate entries for the same competitor (选手) in the OIerDb data; phrases like merge these oiers; combine entries.

How do I install Merge Oier in Claude Code?

Run `npx skills add OIerDb-ng/OIerDb --skill merge-oier -a claude-code`. Or copy the skill folder (.claude/skills/merge-oier in OIerDb-ng/OIerDb) into .claude/skills/merge-oier in your project. Claude Code loads it when a task matches its description.

How do I install Merge Oier in Codex?

Run `npx skills add OIerDb-ng/OIerDb --skill merge-oier -a codex`. Or copy the skill folder (.claude/skills/merge-oier in OIerDb-ng/OIerDb) into .agents/skills/merge-oier in your project. Codex loads it when a task matches its description.

Can I use Merge Oier in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OIerDb-ng/OIerDb --skill merge-oier -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/merge-oier, .gemini/skills/merge-oier, .github/skills/merge-oier and .opencode/skills/merge-oier in your project.

What does Merge Oier need to run?

Going by SKILL.md and its folder, Merge Oier needs the command-line tools its instructions call (gh).

Does Merge Oier access the network?

SKILL.md names 1 domain. In commands or code: oier.baoshuo.dev; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Merge Oier safe to install?

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.

What licence does Merge Oier use?

Merge Oier is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Merge Oier use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Merge Oier?

Skills that share tags, products or a category with Merge Oier: Merge (remotion-dev/remotion, 63k stars), Merge (withastro/astro, 63k stars), Merge Up (symfony/symfony, 31k stars) and Merge (alirezarezvani/claude-skills, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Merge Oier?

OIerDb-ng (a GitHub organization) maintains it in OIerDb-ng/OIerDb, which has 976 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on August 21, 2026.

Source: OIerDb-ng/OIerDb on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.