riscos-desktop-fileraction
Skill4 starsChanged 8 months agoMITView on GitHub
Start interactive RISC OS Filer operations through the FilerSWIs/FilerAction module by sending the `FilerAction_SendSelectedDirectory`, `FilerAction_SendSelectedFile`, and `FilerAction_SendStartOperation` SWIs in the correct order. Use this skill when Codex needs to launch desktop copy, move, delete, access, set type, count, stamp, copy-local, or find operations via the Filer action window rather than performing filesystem changes directly.
In this repository47 other files it gives its agents.
- allocating-resourcesSkill
- ci-testingSkill
- creating-pull-requestsSkill
- designing-modulesSkill
- porting-to-riscos-cSkill
- reading-assemblySkill
- riscos-commandsSkill
- riscos-filer-likeSkill
- riscos-filesystemSkill
- riscos-graphics-convertersSkill
- riscos-network-dcistatisticsSkill
- riscos-network-resolverSkill
- riscos-outputSkill
- riscos-reSkill
- riscos-styleSkill
- riscos-throwbackSkill
- riscos-urls-fetchingSkill
- riscos-urls-launchingSkill
- riscos-wimp-appSkill
- riscos-wimpSkill
- riscos-wimp-templatesSkill
- updating-robe-skillsSkill
- using-bbcbasicSkill
- using-cmhgSkill
- using-ghSkill
- using-gitSkill
- using-libasmSkill
- using-libgcontextSkill
- using-liboslibSkill
- using-libriscoslibSkill
- using-libtoolboxSkill
- using-makefilesSkill
- using-perlSkill
- using-stronghelpSkill
- using-toolbox-imagefilegadgetSkill
- using-tooltesterSkill
- writing-assemblySkill
- writing-assembly-testsSkill
- writing-cmodulesSkill
- writing-cplusplusSkill
- writing-cSkill
- writing-fortranSkill
- writing-oslib-defsSkill
- writing-pascalSkill
- writing-prminxmlSkill
- writing-pymodulesSkill
- writing-pyromaniac-integration-testsSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use the FilerAction SWIs to ask the desktop Filer to perform an interactive operation.
- Very specific: line 14
Ensure the destination task is the Filer action task, typically after *WimpTask Filer_Action.
- Very specific: line 17
Call FilerAction_SendSelectedFile once for each selected object.
- Very specific: line 22
Do not call SendStartOperation before the directory and file selections have been sent.
- Very specific: line 26
Use these R1 operation values for FilerAction_SendStartOperation:
- Very specific: line 56
delete: R3 unused, R4 = 0
- Distinctive: line 66
Treat the SWI string inputs as control-terminated RISC OS strings:
- Distinctive: line 77
Use this skill when the user wants the interactive desktop experience.
- Distinctive: line 81
When writing code that uses these SWIs:
- Distinctive: line 83
keep the task handle explicit and thread it through all three calls
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
riscos-desktop-fileraction
Use the FilerAction SWIs to ask the desktop Filer to perform an interactive operation. This is for starting a Filer action window, not for silent filesystem updates.
Workflow
- Ensure the destination task is the Filer action task, typically after
*WimpTask Filer_Action. - Call
FilerAction_SendSelectedDirectoryfirst. PassR0 = task handle,R1 -> nul-terminated source directory name. - Call
FilerAction_SendSelectedFileonce for each selected object. PassR0 = task handle,R1 -> nul-terminated leaf name. - Call
FilerAction_SendStartOperationlast. PassR0 = task handle,R1 = operation,R2 = option flags,R3 -> auxiliary data,R4 = auxiliary data length.
Do not call SendStartOperation before the directory and file selections have been sent. The module buffers file names and flushes that buffer when the operation starts.
Operations
Use these R1 operation values for FilerAction_SendStartOperation:
0copy1move (rename)2delete3set access4set type5count6move by copy-and-delete7copy local within directory8stamp9find
Option bits
Set R2 with any combination of:
- bit 0: verbose
- bit 1: confirm
- bit 2: force
- bit 3: newer
- bit 4: recurse
The original documentation lists only bits 0-4. Some headers define later flags for newer systems, but use them only if the target environment is known to support them.
Auxiliary data by operation
For R3 and R4:
- copy, move, move-by-copy-and-delete:
R3 -> nul-terminated destination directory,R4 = strlen(R3) + 1 - delete:
R3unused,R4 = 0 - set access:
R3 -> word containing the access specification,R4 = sizeof(int) - set type:
R3 -> word containing the file type in bits 0-11,R4 = sizeof(int) - count:
R3unused,R4 = 0 - copy local:
R3 -> nul-terminated destination leaf name,R4 = strlen(R3) + 1 - stamp:
R3unused,R4 = 0 - find:
R3 -> nul-terminated object name to find,R4 = strlen(R3) + 1
String handling
Treat the SWI string inputs as control-terminated RISC OS strings:
SendSelectedDirectorystops at space or any control character, so pass a clean directory path with no trailing parameters.SendSelectedFileaccumulates leaf names separated by spaces.- Directory and leaf names should be provided separately; do not send full paths through
SendSelectedFile.
Behavioural notes
- The module sends Wimp user messages
Message_FilerSelectionDirectory,Message_FilerAddSelection, andMessage_FilerAction. - The file-selection buffer is limited to 256 bytes in the original implementation. Large selections may be split across multiple
Message_FilerAddSelectionmessages automatically. Service_WimpCloseDownclears any buffered selection state. Do not assume partial state survives task shutdown.- Use this skill when the user wants the interactive desktop experience. If they want direct non-interactive filesystem work, use normal filesystem interfaces instead.
Implementation guidance
When writing code that uses these SWIs:
- keep the task handle explicit and thread it through all three calls
- build typed helper functions for each SWI rather than passing raw register blocks through the whole codebase
- preserve the exact ordering of calls
- compute
R4from the actual auxiliary payload length, including the terminating nul for strings
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.

