fatfs-integration
Skill36 starsChanged 5 months agoMITView on GitHub
Use when integrating, porting, configuring, or debugging FatFs FAT/exFAT filesystems, diskio drivers, SD cards, SPI flash disks, or embedded file I/O failures
In this repository75 other files it gives its agents.
- 8051-mcu-debugSkill
- avem-integrationSkill
- battery-charger-fuel-gauge-integrationSkill
- ble-gatt-integrationSkill
- bootloader-debugSkill
- canbus-integrationSkill
- canopen-integrationSkill
- cellular-at-modem-integrationSkill
- cmbacktrace-integrationSkill
- cmsis-dsp-integrationSkill
- cortex-m-debugSkill
- cortex-r5-debugSkill
- crc-checksum-integrationSkill
- easylogger-integrationSkill
- embedded-app-example-libsSkill
- embedded-buffer-queue-libsSkill
- embedded-data-parsing-libsSkill
- embedded-debug-entrySkill
- embedded-fault-debugSkill
- embedded-framework-libsSkill
- embedded-input-libsSkill
- embedded-library-entrySkill
- embedded-linux-login-debugSkill
- embedded-peripheral-bringupSkill
- embedded-serial-log-debugSkill
- embedded-state-machine-libsSkill
- embedded-timing-libsSkill
- epd-integrationSkill
- esp-idf-integrationSkill
- flashdb-integrationSkill
- freemodbus-integrationSkill
- freertos-kernel-debugSkill
- freertos-plus-tcp-integrationSkill
- gnss-gps-integrationSkill
- hardware-interface-debugSkill
- heatshrink-integrationSkill
- letter-shell-integrationSkill
- littlefs-integrationSkill
- low-power-debugSkill
- lvgl-integrationSkill
- lwip-integrationSkill
- mbedtls-integrationSkill
- mcuboot-integrationSkill
- mcu-flashing-debugSkill
- micro-ecc-integrationSkill
- miniz-integrationSkill
- mqtt-embedded-integrationSkill
- nanopb-integrationSkill
- nrf-connect-sdk-integrationSkill
- nr-micro-shell-integrationSkill
- openocd-jlink-stlink-debugSkill
- openthread-integrationSkill
- ota-update-integrationSkill
- plooc-integrationSkill
- power-management-integrationSkill
- qspi-xip-flash-debugSkill
- readme-writingSkill
- riscv-mcu-debugSkill
- rtos-debugSkill
- rt-thread-integrationSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Use this skill to integrate FatFs by proving the disk I/O layer before trusting filesystem behavior.
- Distinctive: line 14
Use this skill when:
- Distinctive: line 20
Do not use this skill when the raw block device cannot read/write sectors yet.
- Distinctive: line 47
Add locking if shared. Enable and implement synchronization when multiple tasks can access the same volume.
- Very specific: line 51
Write, f_sync/f_close, unmount/reset, remount, and read back.
- Distinctive: line 64
Before claiming FatFs works:
≈ “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
FatFs Integration
Overview
Use this skill to integrate FatFs by proving the disk I/O layer before trusting filesystem behavior. FatFs is portable C, but the target-specific diskio functions, sector geometry, mount policy, and media timing decide whether it works reliably.
When To Use
Use this skill when:
- The user wants to add or debug FatFs on SD card, eMMC, USB MSC, RAM disk, SPI flash, or block devices.
- The issue involves
f_mount,f_open,f_read,f_write,FR_DISK_ERR,FR_NOT_READY,FR_NO_FILESYSTEM, long filenames, Unicode, or exFAT. - The project uses
ff.c,ffconf.h,diskio.c, orFATFS.
Do not use this skill when the raw block device cannot read/write sectors yet; debug the storage driver first.
First Questions
Ask for:
- Media type and transport: SDIO, SPI SD, eMMC, USB MSC, RAM disk, or flash translation layer.
- Sector size, sector count, erase/block size, and whether writes are cached.
ffconf.h,diskio.c, and current FatFs return code.- RTOS or bare-metal runtime and whether reentrancy is enabled.
- Whether formatting is allowed. Formatting can destroy user data.
- Long filename, Unicode, exFAT, timestamp, and multi-volume requirements.
Integration Checklist
- Prove disk I/O.
disk_initialize,disk_status,disk_read,disk_write, anddisk_ioctlmust work independently. - Match sector geometry.
FatFs expects logical sectors and correct sector count.
GET_SECTOR_COUNT,GET_SECTOR_SIZE, andCTRL_SYNCmatter. - Mount before formatting.
Try
f_mountfirst. Ask beforef_mkfsor any operation that can erase media. - Configure
ffconf.hintentionally. Reentrancy, LFN buffers, exFAT, code page, relative paths, and timestamp support affect RAM and behavior. - Add locking if shared. Enable and implement synchronization when multiple tasks can access the same volume.
- Verify persistence.
Write,
f_sync/f_close, unmount/reset, remount, and read back.
Common Failures
FR_DISK_ERRfrom incompletedisk_ioctlor badCTRL_SYNC.FR_NO_FILESYSTEMfrom wrong sector offset or unformatted media.- Data loss because files are not closed or synced before power loss.
- LFN stack/heap buffers exceed MCU memory.
- SD card init works at low speed but data transfer fails after clock switch.
- Multi-task access corrupts files without FatFs reentrancy support.
Verification
Before claiming FatFs works:
- State media, sector size/count,
ffconf.hoptions, and mount path. - Confirm disk read/write/ioctl tests.
- Confirm mount behavior and whether format was skipped, approved, or performed.
- Confirm create/write/sync/readback after reset or remount.
- Confirm locking policy when RTOS is used.
Example
User:
FatFs f_mount 返回 FR_NO_FILESYSTEM。Agent:
- Asks for media type, sector offset, diskio implementation, and whether formatting is allowed.
- Tests raw sector read and
GET_SECTOR_COUNT. - Mounts before formatting and asks before
f_mkfs.
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.

