AGENT SKILL

git-log

暂无简介

License 许可
MIT
最近更新
2026-06-23
Stars
★ 2
Forks
0

02 资源文件 2

03 SKILL.md 正文

Git Log Viewer

Display git log information in a formatted way.

const { execSync } = require('child_process');

function getRecentCommits(n = 10) {
  const output = execSync(`git log --oneline -n ${n}`, { encoding: 'utf8' });
  return output.trim().split('\n').map(line => {
    const [hash, ...msg] = line.split(' ');
    return { hash, message: msg.join(' ') };
  });
}

module.exports = { getRecentCommits };

04 同仓库更多 Skills