[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EDPXYRX5P8SW87B9GPTZZG":3,"skill-same:01M7EDPXYRX5P8SW87B9GPTZZG":49},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":13,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":6,"ownerDescription":27,"updatedAt":28,"install":29,"resources":42},"01M7EDPXYRX5P8SW87B9GPTZZG","system-administration",null,"jonahthan433\u002FCortexOS","jonahthan433","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F211465495?v=4","01M7ECH9HPHGA89DCXHHJBTS3C","jonah.ai","01M7ECH9JCEM45DZMWPT7148S1",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002Fsystem-administration\u002Fsystem-administration\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# system-administration\n\n# System Administration (Omarchy)\n\nManage Linux system administration tasks on Omarchy (Arch-based) systems.\n\n## When This Skill MUST Be Used\n\n**ALWAYS invoke this skill for end-user requests involving:**\n\n- Disk space analysis (`df`, `lsblk`, partition layout)\n- Partition management (resizing, merging, expanding)\n- LVM detection and handling\n- Encrypted filesystem inspection (LUKS, cryptsetup)\n- Drive health checks (`smartctl`, disk diagnostics)\n- Mount point management and fstab editing\n- Swap space analysis and configuration\n\n## Disk Inspection Workflow\n\n### 1. Initial Layout Analysis\n\nAlways start with a high-level view of the disk layout:\n\n```bash\n# Show all block devices and their mount points\nlsblk\n\n# Detailed partition table\nlsblk -f  # includes filesystem types and labels\n\n# Check mounted filesystems\nmount | grep -v \"proc\\|sysfs\\|cgroup\\|tmpfs\\|devpts\\|mqueue\"\n```\n\nExample output interpretation:\n```\nNAME   MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS\nsda      8:0    0 238.5G  0 disk\n├─sda1   8:1    0   600M  0 part\n├─sda2   8:2    0     2G  0 part\n├─sda3   8:3    0   183G  0 part  # Potential expansion candidate\n├─sda4   8:4    0     2G  0 part  \u002Fboot\n└─sda5   8:5    0  50.9G  0 part  \u002F # encrypted LVM\n```\n\n### 2. Detect LVM vs Traditional Partitions\n\nCheck for LVM tooling availability:\n\n```bash\n# These commands should exist if LVM is in use\nwhich pvs vgs lvs 2>\u002Fdev\u002Fnull\n\n# If any exist and return output, the system uses LVM\npvs  # Physical volumes\nvgs  # Volume groups\nlvs  # Logical volumes\n\n# If commands are missing (command not found), assume traditional partitioning\n```\n\n**Key indicators:**\n- **LVM present**: `pvs`, `vgs`, `lvs` produce output → use `lvextend`\n- **LVM absent**: `pvs: command not found` → traditional partitions\n\n### 3. Identify Encrypted Filesystems\n\n```bash\n# Check for LUKS encryption\nblkid \u002Fdev\u002Fsda5\n\n# Typical output for encrypted partition:\n# \u002Fdev\u002Fsda5: LUKS1 uuid=\"...\" \n\n# Check what's currently decrypted and in use\ncat \u002Fproc\u002Fmounts | grep crypt\nls \u002Fdev\u002Fmapper\u002F\n\n# Look for crypttab entries\ncat \u002Fetc\u002Fcrypttab\n```\n\nIf you see entries like `omarchy_root` in `\u002Fdev\u002Fmapper\u002F`, the partition is LUKS-encrypted with a mapped device.\n\n### 4. Filesystem Types and Usage\n\n```bash\n# Check available space with human-readable format\ndf -h\n\n# Show filesystem types\ndf -Th\n\n# Detailed filesystem info for specific device\nblkid \u002Fdev\u002Fsda5\nfile -s \u002Fdev\u002Fsda5\n```\n\n## Safe Partition Expansion Guidelines\n\n### Before Any Expansion\n\n1. **Backup critical data** - Always ensure backups exist before partition operations\n2. **Verify system integrity** - `dmesg` output, no pending I\u002FO errors\n3. **Check SMART health** - `smartctl -a \u002Fdev\u002Fsda` (if available)\n4. **Confirm target partition is safe to modify** - never touch active partitions without proper unmounting\n\n### Identifying Expansion Candidates\n\nLook for:\n- Unallocated space on the disk (`lsblk -f` shows gaps)\n- Partitions that are not mounted and not in use\n- Partitions with no filesystem signature (`blkid` returns nothing)\n\n**Warning signs to avoid:**\n- Partitions you cannot read (`file -s \u002Fdev\u002FsdX` returns \"no read permission\")\n- Partitions actively mounted (check `\u002Fproc\u002Fmounts`)\n- Partitions that are part of active RAID arrays\n- Swap or hibernation partitions\n\n### Safe Expansion Procedure (High-Level)\n\n1. **Analyze current state** - Document partition table (`sfdisk -d \u002Fdev\u002Fsda`)\n2. **Shrink\u002Fresize safely** - Unmount target partition, resize filesystem\n3. **Handle encryption layers** - If LUKS, resize both LUKS container and inner filesystem\n4. **Extend filesystem** - `resize2fs` for ext4, `xfs_growfs` for XFS\n5. **Update \u002Fetc\u002Ffstab** if mount points changed\n6. **Verify** - `df -h`, `mount`, and reboot test\n\n## Common Scenarios\n\n### Scenario: Expand Root Filesystem on Encrypted Partition\n\n```bash\n# Check current state\nlsblk -f\ndf -h \u002F\n\n# If using LUKS (e.g., \u002Fdev\u002Fmapper\u002Fomarchy_root)\n# Expand the underlying block device first (partition or LUKS container)\n# Then resize the filesystem:\nsudo cryptsetup resize omarchy_root\nsudo resize2fs \u002Fdev\u002Fmapper\u002Fomarchy_root\n```\n\n### Scenario: Check Disk Health Before Expansion\n\n```bash\n# Install smartmontools if needed\nomarchy pkg add smartmontools\n\n# Check health\nsudo smartctl -a \u002Fdev\u002Fsda\nsudo smartctl -H \u002Fdev\u002Fsda\n```\n\n### Scenario: SSH Tunnel for Remote Service Access\n\n```bash\n# Forward remote port 9119 (Hermes dashboard) to localhost\nssh -N -L 9119:localhost:9119 root@192.168.1.11\n\n# Verify tunnel works\ncurl http:\u002F\u002Flocalhost:9119\n\n# Background with auto-reconnect\nssh -N -o ServerAliveInterval=60 -L 9119:localhost:9119 root@192.168.1.11\n```\n\n## Privilege Escalation\n\nUse `sudo` for all privileged commands. For Omarchy systems, sudo is typically available and may be passwordless for certain commands.\n\n**Avoid:** Directly editing `\u002Fetc\u002Ffstab` without understanding the implications. Always test with `mount -a` after changes.\n\n## Troubleshooting\n\n### Permission Denied Errors\n\n```bash\n# Check if commands exist\nwhich pvs vgs lvs blkid smartctl\n\n# Install missing tools\nomarchy pkg add lvm2 e2fsprogs xfsprogs smartmontools\n\n# Run with sudo when needed\nsudo blkid \u002Fdev\u002Fsda5\n```\n\n### \"No Read Permission\" on Partitions\n\nA `file -s \u002Fdev\u002Fsda3` returning \"no read permission\" means the kernel\u002Fuser lacks access. Try:\n\n```bash\nsudo file -s \u002Fdev\u002Fsda3\nsudo blkid \u002Fdev\u002Fsda3\n```\n\nIf still empty, the partition may be uninitialized or protected.\n\n### Checking Mount Status\n\n```bash\n# What's currently mounted\ncat \u002Fproc\u002Fmounts\n\n# Specifically check our target partitions\ncat \u002Fproc\u002Fmounts | grep sda\n```\n\n## References\n\n- [`references\u002Fdisk-inspection-commands.md`](references\u002Fdisk-inspection-commands.md) - Quick reference for all disk inspection commands\n- [`references\u002Fpartition-resize-checklist.md`](references\u002Fpartition-resize-checklist.md) - Step-by-step pre-flight checklist for safe expansion\n",{},"main","38b32c99e7ed0b8e215d638e92cfa452c1ec3079","skills\u002Fimported\u002Fsystem-administration\u002Fsystem-administration","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS","https:\u002F\u002Fgithub.com\u002Fjonahthan433","AI Consultant","2026-10-24 05:13:39",{"source":7,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add jonahthan433\u002FCortexOS --skill system-administration",{"tool":35,"command":36},"bunx","bunx skills add jonahthan433\u002FCortexOS --skill system-administration",{"tool":38,"command":39},"pnpm","pnpm dlx skills add jonahthan433\u002FCortexOS --skill system-administration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002Fsystem-administration\u002Fsystem-administration\u002FSKILL.md",true,[43],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"skill.json","REFERENCE","参考文档",406,"https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002Fsystem-administration\u002Fsystem-administration\u002Fskill.json",[50,56,62,68,74,80],{"skillNo":51,"name":52,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":18},"01M7EDQZDQX3Q8Y7GCQX6KN9V7","opportunity-brief","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fsales\u002Fopportunity-brief\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M7EDQYA0V9Y99VKBREJJ3MRT","morning-intel","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fmorning-intel\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7EDQVX1JVY0B6PDHKKGM19G","decision-brief","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fdecision-brief\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M7EDQV1GENZAC2SZSD8KZ3GM","weekly-review","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fweekly-review\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7EDQT2KETJ1Y3CGVN9EKW2J","system-health","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fops\u002Fsystem-health\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7EDQQN2JK3XPWMS1M4T0F3K","backup-restore","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fops\u002Fbackup-restore\u002FSKILL.md",[],[]]