oliverv/caro / .agents/skills/oma-hwp
oma-hwp
FlaggedConvert Hangul HWP, HWPX, or HWPML documents to Markdown with kordoc. Use for text, table, and image extraction from these formats.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.7 KB |
| config/hwp-config.yaml | config | 1.3 KB |
| resources/balanced-tables.ts | script | 1.1 KB |
| resources/bun.lock | other | 1.4 KB |
| resources/execution-protocol.md | markdown | 7.2 KB |
| resources/flatten-tables.ts | script | 3.3 KB |
| resources/package.json | manifest | 252 B |
| resources/troubleshooting.md | markdown | 4.4 KB |
| resources/tsconfig.json | config | 185 B |
| resources/turndown-plugin-gfm.d.ts | script | 444 B |
resources/balanced-tables.ts
View on GitHub/**
* Replace balanced outermost table blocks. Nested tables are passed to the
* callback as part of their parent instead of being truncated at the first
* closing tag.
*/
export function replaceBalancedTables(
source: string,
replace: (tableHtml: string) => string,
): string {
const tag = /<\/?table\b[^>]*>/gi;
let depth = 0;
let blockStart = -1;
let cursor = 0;
let output = "";
for (let match = tag.exec(source); match; match = tag.exec(source)) {
const closing = /^<\/table/i.test(match[0]);
if (!closing) {
if (depth === 0) {
blockStart = match.index;
output += source.slice(cursor, blockStart);
}
depth += 1;
continue;
}
if (depth === 0) continue;
depth -= 1;
if (depth === 0 && blockStart >= 0) {
const blockEnd = tag.lastIndex;
output += replace(source.slice(blockStart, blockEnd));
cursor = blockEnd;
blockStart = -1;
}
}
// Preserve malformed/unclosed input verbatim rather than dropping content.
return output + source.slice(blockStart >= 0 ? blockStart : cursor);
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |