Markdown Converter
Agent skill for markdown-converter
**Purpose**: Operate OpenCode tasks while honoring user preferences and house style.\
Sign in to like and favorite skills
Purpose: Operate OpenCode tasks while honoring user preferences and house style.
When to read this: On task initialization and before major decisions; re-skim when requirements shift.
Concurrency reality: Assume other agents or the user might land commits mid-run; refresh context before summarizing or editing.
| Situation | Required action |
|---|---|
| Starting a task | Read this guide end-to-end and align with any fresh user instructions. |
| Tool or command hangs | If a command runs longer than 5 minutes, stop it, capture logs, and check with the user. |
| Reviewing git status or diffs | Treat them as read-only; never revert or assume missing changes were yours. |
| Shipping Rust changes | Run and before handing off. |
| Adding a dependency | Research well-maintained options and confirm fit with the user before adding. |
justfile exists, prefer invoking tasks through just for build, test, and lint. Do not add a justfile unless asked. If no justfile exists and there is a Makefile you can use that.just targets if present; otherwise run cargo fmt, cargo clippy --all --benches --tests --examples --all-features, then the targeted cargo test commands.just targets; if none exist, confirm with the user before running npm or pnpm scripts.just targets; if absent, run the relevant uv run commands defined in pyproject.toml.ast-grep for tree-safe edits when it is better than regex.git commands that write to files, only run read only commands like git show.git status or git diff, treat them as read-only context; never revert or assume missing changes were yours. Other agents or the user may have already committed updates..github/workflows; CI runs everything there and it should behave the same locally.EVERYTHING. Tests must be rigorous. Our intent is ensuring a new person contributing to the same code base cannot break our stuff and that nothing slips by. We love rigour.mod tests {}; avoid inventing inline modules like mod my_name_tests.uv and pyproject.toml in all Python repos. Prefer uv sync for env and dependency resolution. Do not introduce pip venvs, Poetry, or requirements.txt unless asked.Any when possible; use Union, Optional, or specific protocol types instead.@dataclass or Pydantic models over loose dictionaries for structured data. This gives us type safety and validation.pydantic-settings for configuration management, not raw os.environ parsing or dotenv.asyncio.gather or asyncio.TaskGroup for concurrent operations. Be explicit about which executor blocking functions run in.model_validator, field_validator, model_config. Prefer Field(json_schema_extra=...) over Field(..., description=...).try/catch around everything - let errors propagate with clear error types. Avoid list(dict.values()) patterns - use comprehensions or direct iteration. Don't use time.sleep in async code - use asyncio.sleep.pyproject.toml for all package metadata. Structure as src/ layout for libraries, flat for simple scripts.ruff check --fix and ruff format before committing.pytest.ini or pyproject.toml config.pytest.mark.asyncio and specify scope="function".pytest.fixture with clear names. Use autouse sparingly.Structured returns: Functions should return a single structured result (dataclass, NamedTuple, or object), not multiple values; bundle tuple-ish returns into one result object.
Self-descriptive signatures: Create Python functions that are self-descriptive and take positional arguments for the primary subject. From there everything is a keyword argument. The name of the function should be self-describing on what it is doing to the positional argument.
# ✅ Good: clear subject, keyword config def resolve_path( path: Path, # Primary subject (positional) *, # Force keyword-only after this base_folder: Path, # Configuration (keyword) must_exist: bool = True, ) -> Result[Path, ValueError]: """Resolve a file path relative to a base folder.""" ... # ❌ Bad: multiple positional args, unclear subject def resolve_path(raw_path: Path, folder_path: Path, must_exist: bool = True): """Resolve a path.""" ... # ❌ Bad: name doesn't describe what happens to argument def process_data(config: Config, data: DataFrame, options: Options): """Process something with something else.""" ... # ✅ Good: name describes action on subject def transform_dataframe( data: DataFrame, *, config: Config, options: Options, ) -> Result[DataFrame, ValueError]: """Transform a dataframe using config and options.""" ...
crate:: to super::; please don't use super::. If you see a lingering super:: from someone else clean it up.pub use on imports unless you are re-exposing a dependency so downstream consumers do not have to depend on it directly.lazy_static!, Once, or similar; prefer passing explicit context structs for any shared state.cargo fmt.cargo clippy --all --benches --tests --examples --all-features and address warnings.cargo test or just targets to cover unit and end-to-end paths.Before finishing a task: