diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Revision history for convention
+
+## 0.1.0.0 -- YYYY-mm-dd
+
+* First version. Released on an unsuspecting world.
diff --git a/ghc-debug-convention.cabal b/ghc-debug-convention.cabal
new file mode 100644
--- /dev/null
+++ b/ghc-debug-convention.cabal
@@ -0,0 +1,17 @@
+cabal-version:      2.4
+name:               ghc-debug-convention
+version:            0.1.0.0
+synopsis: Definitions needed by ghc-debug-stub and ghc-debug-common
+description: Definitions needed by ghc-debug-stub and ghc-debug-common
+-- bug-reports:
+license:            BSD-3-Clause
+author:             Matthew Pickering
+maintainer:         matthewtpickering@gmail.com
+copyright:          BSD-3-Clause
+extra-source-files: CHANGELOG.md
+
+library
+    exposed-modules: GHC.Debug.Convention
+    build-depends:    base ^>=4.16.0.0, filepath ^>= 1.4 , directory ^>= 1.3
+    hs-source-dirs:   src/
+    default-language: Haskell2010
diff --git a/src/GHC/Debug/Convention.hs b/src/GHC/Debug/Convention.hs
new file mode 100644
--- /dev/null
+++ b/src/GHC/Debug/Convention.hs
@@ -0,0 +1,11 @@
+module GHC.Debug.Convention (socketDirectory) where
+
+import System.FilePath
+import System.Directory
+
+-- | The default socket directory in which to place unix domain sockets in
+-- ghc-debug-stub.
+socketDirectory :: IO FilePath
+socketDirectory = do
+    xdgDir <- getXdgDirectory XdgData ""
+    return (xdgDir </> "ghc-debug/debuggee/")
