feat(skills): add cleanup-artifacts skill and session hygiene protocol

This commit is contained in:
Ajasra committed 2026-10-31 15:10:49 +08:00
1 parent 418792d1ec
commit 14cc1ab6f0
4 files changed
+59 -3

No files matched your search

+8 -2
View File
@@ -8,11 +8,17 @@ import sys
def lexical(path):
return Path(os.path.abspath(path))
s = str(os.path.abspath(path))
if s.startswith('\\\\?\\'):
s = s[4:]
return Path(s)
def link_target(path):
return lexical(path.parent / os.readlink(path))
target = os.readlink(path)
if os.path.isabs(target):
return lexical(target)
return lexical(path.parent / target)
def inside(path, root):
+1 -1
View File
@@ -51,7 +51,7 @@ def metadata(text):
def local_links(path):
fenced = False
for number, line in enumerate(path.read_text().splitlines(), 1):
for number, line in enumerate(path.read_text(encoding='utf-8').splitlines(), 1):
if line.lstrip().startswith(('```', '~~~')):
fenced = not fenced
continue