agentleFS
gerphgerph/riscos-agent-skills/skills/using-liboslib/SKILL.md

using-liboslib

Skill4 starsChanged 8 months agoMITView on GitHub

Use when working with the OSLib typed SWI interface library in the RISC OS build environment, especially to identify which headers, functions, and public types exist for Core, Computer, User, or Toolbox APIs and to translate between SWI names and OSLib wrapper names.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 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.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when code depends on the OSLib typed SWI interface library.

    line 10
  2. Very specific:

    Read references/overview.md for the library layout and where to look.

    line 18
  3. Very specific:

    Read references/naming.md when you need to map between PRM SWI names and C wrapper names.

    line 19
  4. Very specific:

    Read only the area reference you need: references/core.md, references/computer.md, references/user.md, or references/toolbox.md.

    line 21
  5. Very specific:

    If assembler or DefMod naming matters, inspect the matching hdr/ file for the same component name.

    line 26

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Using OSLib

Use this skill when code depends on the OSLib typed SWI interface library.

OSLib in this environment is exported under /riscos-resources/Export/Lib/OSLib. This skill is about the OSLib API surface itself: headers, wrapper naming, public types, and which function families are provided.

Default workflow

  1. Read references/overview.md for the library layout and where to look.
  2. Read references/naming.md when you need to map between PRM SWI names and C wrapper names.
  3. Read only the area reference you need: references/core.md, references/computer.md, references/user.md, or references/toolbox.md.
  4. For a specific call you are about to use, confirm the exact signature in the matching exported header under /riscos-resources/Export/Lib/OSLib/.../h.
  5. If assembler or DefMod naming matters, inspect the matching hdr/ file for the same component name.

What the reference files contain

The area reference files are source-derived inventories from the exported OSLib headers. For each public header they list:

  • the public typedef aliases declared there
  • the exported wrapper functions declared there

This is intended to answer "what does OSLib provide?" without forcing every agent to trawl the whole tree.

Scope notes

  • Core covers the fundamental OS-facing interfaces such as os, osbyte, osword, osspriteop, colourtrans, messagetrans, territory, and related service and event wrappers.
  • Computer covers filing systems, osfile, osfind, osgbpb, osfscontrol, sockets, serial, resourcefs, and machine-level subsystems.
  • User covers desktop-facing APIs such as wimp, font, draw, drawfile, jpeg, pdriver, and task/window helpers.
  • Toolbox covers the Toolbox core plus object and gadget modules such as window, menu, iconbar, saveas, writablefield, and friends.

Related environment details

The exported object variants currently present under /riscos-resources/Export/Lib/OSLib/o are:

  • OSLib
  • OSLib-32
  • OSLib-64
  • OSLibzm
  • OSLibzm-32
  • OSLibzm-64

The build-environment documentation also identifies ${OSLIB} as the OSLib typed SWI interface library, and the 64-bit toolchain documentation shows -loslib with -I$RO64EXPORT/Lib/OSLib as the direct compiler/linker form.

Limits

This skill inventories OSLib's exported headers. It does not replace the PRMs for behavioural detail, and it does not describe RISC_OSLib, which is a different library with its own conventions and helper layers.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.